A great, in depth post on dealing with NSUserDefaults in Swift. This allows for relatively easy persistence of the state of your app over restarts.
Programming
Enums for hard-coded configuration
While writing my new Stretch Timer app, I needed to set lower and upper limits for three key numbers. I had them hardcoded as numeric literals but when I wanted to change one of them, it occurred to me there must be a better way.
0 Comments