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
Post a Comment