I have UIViewController
as a rootViewController
and I want to navigate from UIViewController
to UITabBarController
after click button1.
navigate to tab1 after click on button1. ignore other button
here is my IBAction method for btn1
- (IBAction)btn1Click:(id)sender {
}
Appreciate for help
First You need to give storyboardID
to UITabBarController using storyboard, such as tabVC
. After that write below code to open the UITabBarController
as model segue.
-(IBAction)btn1Click:(id)sender {
UITabbarController *tabVC = [self.storyboard instantiateViewControllerWithIdentifier:@"tabVC"];
[self presentViewController:tabVC animated:YES completion:nil];
}
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.