以编程方式呈现新视图后,TabBarController消失

时间:2018-10-08 14:17:32

标签: ios objective-c programmatically

在大量寻找解决方案并没有找到正确答案后,我发布了问题:执行时,我有两个viewControllers company和companyDetail

CompanyViewDetail *cDetail = [[CompanyViewDetail alloc] init]; [self presentViewController:cDetail animated:YES completion:nil];

它导航到companyDetailViewController,但是我在AppDelegate中创建的tabBar消失了,下面是代码:

tabBars = [[UITabBarController alloc] init]; self.window.rootViewController = tabBars; self.tabBars.view.autoresizingMask = (UIViewAutoresizingFlexibleHeight); [self.window makeKeyAndVisible];

0 个答案:

没有答案