I have a variable lastPostsGrabbedCounter , a NSNumber , which is defined below.
.h NSNumber *lastPostsGrabbedCounter; @property (nonatomic, retain) NSNumber *lastPostsGrabbedCounter; .m @synthesize postDetailViewController, lastPostsGrabbedCounter; - (void)viewWillAppear:(BOOL)animated { self.lastKnownLocation = [[CLLocation alloc] init]; self.lastPostsGrabbedCounter = [[NSNumber alloc] initWithInt:25]; [self showActivityViewer]; }
This .m file is the table controller in my main view. When the application loads, this viewWillAppear receives a call, but if I switch to another TAB and return, and I try to use var lastPostsGrabbedCounter , do I show it as nil?
Why is it not saved when I leave?
source share