NSUserDefaults to present window only on first launch
问题 i am trying to get a window to show (which it successfully does) on first launch, there is a button on that window (for testing purposes) that sets the bool firstLaunch = NO. for some reason, after pressing the button, the view is not dismissed. app delegate userDefaults = [NSUserDefaults standardUserDefaults]; [userDefaults setBool:firstLaunch forKey:@"firstLaunch"]; newViewController = [[NewView alloc]init]; newViewController.appDelegateOutlet = self; [userDefaults synchronize]; if (