so i have this segmented control in the interface i am using user defaults to store the selected segment in applications view controller's applicationDidEnterBackground
and restoring it in
- (void)applicationWillEnterForeground {
NSNumber *indexNumber;
if (indexNumber = [[NSUserDefaults standardUserDefaults] objectForKey:@"selectedIndex"]) {
NSInteger selectedIndex = [indexNumber integerValue];
self.segmentedControl.selectedSegmentIndex = selectedIndex;
}
but when im launching the app, selecting a segment and then killing the application, i get this error. Program received signal: “SIGKILL” on relaunch.
any help would be appreciated