I created a tab bar controller in a story board which is working perfect. Now i need to move from a view controller to this tab bar controller. I do not have a separate class for the tab bar controller. However I tried creating a class for this tab bar controller but when i call it/initialise it, it just gives a new tab bar instead of whats on the storyboard. Ive been stuck with this for a while now so any help would be appreciated. So application works this way. viewcontroller1 -> viewcontroller2 -> tabbarcontroller (which has a table view and a map view)
如果我正确理解了您的问题,那么您想要做的就是在Attributes Inspector中的Storyboard中为TabBarController分配一个标识符,然后使用该代码通过以下代码以编程方式实例化控制器:
UITabBarController *tabBarController = [self.storyboard instantiateViewControllerWithIdentifier:@"TabBarIdentifer"];
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.