简体   繁体   English

如何加载包含标签栏控制器的.xib文件

[英]how to load a .xib file consisting a tabbar controller

I have a .xib file which consist of a tabbar controller, i want to load it using navigation controller in my didselect row. 我有一个.xib文件,其中包含一个标签栏控制器,我想在didselect行中使用导航控制器加载该文件。 My parent view is a tabbar controller.How to hide my current tabbar controller and display the new. 我的父视图是一个标签栏控制器。如何隐藏我当前的标签栏控制器并显示新的。

You could try having a custom single tab-bar controller in your app. 您可以尝试在应用中使用自定义的单个选项卡栏控制器 When a user clicks on cell of UItableView a tab that leads to a new set of tabs, replace all of the tabs in the single-tab-bar controller. 当用户单击UItableView的单元格时,将导致一个新的选项卡集的选项卡,替换单个选项卡栏控制器中的所有选项卡。

Now user navigates back then change it to old tabs to tab-bar controller. 现在,用户向后导航,然后将其更改为旧选项卡,以使用选项卡栏控制器。

I think it is not best UI. 我认为这不是最好的UI。 but according to your requirement it should work. 但根据您的要求,它应该可以工作。

you can hide Programmatically your UITabBar controller by using below code : 您可以使用以下代码以编程方式隐藏UITabBar控制器:

AppDelegateFileName *appDelegate = (AppDelegateFileName *) [[UIApplication sharedApplication] delegate];
[appDelegate.tabbarController.tabBar setHidden:YES];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM