X-Git-Url: https://git.saurik.com/winterboard.git/blobdiff_plain/b39b993d525e618734bb3eaece87f77f0e5290d4..bb916087f9a8b968ff35a8d06951325cf69ae2de:/Settings.mm?ds=sidebyside diff --git a/Settings.mm b/Settings.mm index edc0d3f..3a5d6b6 100644 --- a/Settings.mm +++ b/Settings.mm @@ -454,8 +454,10 @@ static NSString *_plist; [_settings setObject:[NSNumber numberWithBool:IsIconHiddenDisplayId(WinterBoardDisplayID)] forKey:@"IconHidden"]; [self reloadSpecifiers]; if (![[PSViewController class] instancesRespondToSelector:@selector(showLeftButton:withStyle:rightButton:withStyle:)]) { - self.navigationItem.leftBarButtonItem = nil; - self.navigationItem.rightBarButtonItem = nil; + [[self navigationItem] setLeftBarButtonItem:nil]; + [[self navigationItem] setRightBarButtonItem:nil]; + } else { + [self showLeftButton:nil withStyle:0 rightButton:nil withStyle:0]; } settingsChanged = NO; } @@ -466,8 +468,10 @@ static NSString *_plist; return; } - if (buttonIndex == 0) + if (buttonIndex == 0) { [self cancelChanges]; + return; + } [self suspend]; [self.rootController popController]; @@ -486,7 +490,8 @@ static NSString *_plist; - (void) viewWillAppear:(BOOL)animated { if (settingsChanged) [self settingsChanged]; - [super viewWillAppear:animated]; + if ([super respondsToSelector:@selector(viewWillAppear:)]) + [super viewWillAppear:animated]; } - (void) pushController:(id)controller { @@ -506,8 +511,8 @@ static NSString *_plist; UIBarButtonItem *cancelButton([[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStylePlain target:self action:@selector(settingsConfirmButtonClicked:)]); cancelButton.tag = 0; respringButton.tag = 1; - self.navigationItem.leftBarButtonItem = respringButton; - self.navigationItem.rightBarButtonItem = cancelButton; + [[self navigationItem] setLeftBarButtonItem:respringButton]; + [[self navigationItem] setRightBarButtonItem:cancelButton]; [respringButton release]; [cancelButton release]; } else {