ios - How to present a setup screen from my app delegate? -
i have first time setup screen wish present on first time run of application. have tab bar controller 5 tabs , independent view controller appear on initial run. after clicking uibutton on setup screen, has return tab bar navigation first tab being shown. far in app delegate have this:
// override point customization after application launch. [[nsuserdefaults standarduserdefaults] setbool:yes forkey:@"first time"]; [[nsuserdefaults standarduserdefaults] synchronize]; if([[nsuserdefaults standarduserdefaults] boolforkey:@"first time"] == yes) { [[nsuserdefaults standarduserdefaults] setbool:no forkey:@"first time"]; [[nsuserdefaults standarduserdefaults] synchronize]; sssetupscreenviewcontroller *setupcontroller = [[sssetupscreenviewcontroller alloc] init]; [(uinavigationcontroller *)self.window.rootviewcontroller pushviewcontroller:setupcontroller animated:no];
however, brings black screen every time app launched. simple missing, awesome.
you cannot set yes in beginning since second run.
how following?:
// override point customization after application launch. if([[nsuserdefaults standarduserdefaults] objectforkey:@"first time"] == nil) { [[nsuserdefaults standarduserdefaults] setbool:no forkey:@"first time"]; [[nsuserdefaults standarduserdefaults] synchronize]; sssetupscreenviewcontroller *setupcontroller = [[sssetupscreenviewcontroller alloc] init]; [(uinavigationcontroller *)self.window.rootviewcontroller pushviewcontroller:setupcontroller animated:no];
Comments
Post a Comment