I debugged and got the if then statement working properly, and the code below does seem to work. However, I would like to modify it so the nag screen is not a new view...It should open one of the existing views, but when code for the different view is inserted, it gives me the syntax error before controller...see code below if you can help. I appreciate it.
-
(void)displayMyAppUIApplication *)application {
[window addSubview:rootController.view];
********lots of code here*********
}
- (void)displayNagScreenUIApplication *)application {
[window addSubview:nagScreenController.view];
**** get an error if nagscreenController is changed to an existing controller in myapp******
}
- (void)applicationDidFinishLaunchingUIApplication *)application {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *name1 = [defaults objectForKey"****"];
if (name1 == nil) {
[self displayNagScreen:application];
}
else {
[self displayMyApp:application];
}
[window makeKeyAndVisible];
}
In the following example, if an existing view is inserted in the place of nagScreenController, the syntax error comes. How do I use an existing View?
Thank you.