I am trying to make a NSInteger being abel to contain a number while the app is runing and that I can add numbers to that NSInteger hers my code
// in the .h
NSInteger *count;
// in the .m
count = 0;
Then I save count in NSUserDefaults like so
[[NSUserDefaults standardUserDefaults] setInteger:count forKey:@"key"];
[[NSUserDefaults standardUserDefaults] synchronize];
In the next view after calling NSUserDefaults I do this
count + 4;
The problem is that in the end I always get zero.