The goal:
When my app starts up - I need it to display a view before it gets to the \"Home\" screen. Its a tab bar application and this view is not
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
if(!isAgreementAccepted)
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"IDD"];
self.window.rootViewController=vc;
}
return YES;
}
If agreement is not accepted set the T&C viewController
as rootViewController
when user click the accept button then set the TabBarviewController
as root.
u can access the widow object through application delegate any where
[[[UIApplication sharedApplication]delegate] window].rootViewController=tabViewController.