Hi I have a UITabBarController
which i want to add on top an overlay containing a registration form. I've seen several places that the way to go is to use this command:
[[[UIApplication sharedApplication] keyWindow] addSubview:registrationView];
But How can I create registrationView from the storyboard and be able to access it from the UITabBarController
?
Note: My registrationView should hide the tabs so i can't put it in one tab.
Hey this will solve you issue
UITabBarController *tabBarController = (UITabBarController *) self.window.rootViewController;
ViewController *RegistrationView = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
[tabBarController presentModalViewController:RegistrationView animated:YES];
[tabBarController.selectedViewController viewDidAppear:true];
do this in - (void)applicationDidBecomeActive:(UIApplication *)application
function
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.