I am trying to put a first launch view. I already tried some stuff but that won't work.
Here is what I have:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIPageControl *pageControl = [UIPageControl appearance];
pageControl.pageIndicatorTintColor = [UIColor lightGrayColor];
pageControl.currentPageIndicatorTintColor = [UIColor blackColor];
pageControl.backgroundColor = [UIColor whiteColor];
return YES;
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"yourCondition"])
{
//launch your first time view
self.viewController = [[viewController alloc] initWithNibName:@"viewController" bundle:nil];
}
else
{
//launch your default view
self.viewController = [[viewController alloc] initWithNibName:@"defaultViewController" bundle:nil];
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"yourCondition"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
}
Somehow that doesn't work it says that viewController is not found as an object type of AppDelegate. Any Ideas?