ios - Should I keep app state in core data? -



ios - Should I keep app state in core data? -

i seek create app stopwatch feature , having confusing points. first, proper way maintain state of stopwatch (start, pause, stop). should maintain state in core info ?

second, created core info entity date property maintain start time. should delete entity each time stopwatch reset or maintain in separate record ?

coredata heavy handed want unless want maintain lots of different records in specific ways

nsuserdefaults fine, persistent unless delete app

this tutorial good. if had 2 variables time_started , time_ended, you'd time between , write them userdefaults. if want maintain record of multiple entries utilize loop increments count or index.

dont have time @ mo write code tutorial , might find nsuserdefaults better.

hope helps

ios core-data

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -