I want to store an integer in NSUserDefaults that could potentially be 0. How do I distinguish between an integer that was stored as 0 and a key that does not exist in NSUserDefaults?
According to the NSUserDefaults docs integerForKey
returns 0 if the key did not exist in NSUserDefaults. So, my question is: how do I distinguish between a nonexistent key and a key I've stored as 0?