简体   繁体   English

如何隐藏带有其他视图控制器的标签栏视图控制器?

[英]How to hide a tab bar view controller with another view controller over it?

In Periscope Live Broadcast app, when you click on WORLD tab bar and then tap on "List" and you tap to watch a live stream, the Live stream view controller will pop up from the bottom covering the entire tab bar view controller with the tab bar completely hidden. 在Periscope Live Broadcast应用中,当您单击WORLD标签栏,然后单击“列表”,然后单击以观看实时流时,实时流视图控制器将从底部弹出,覆盖整个带有标签的标签栏视图控制器酒吧完全隐藏。

(I'm currently using Tab Bar Controller and Navigation Controller and I can't get it done) (我目前正在使用Tab栏控制器和导航控制器,但无法完成)

How is this done? 怎么做?

You can call your "modal" view controller programmatically: 您可以通过编程方式调用“模态”视图控制器:

NSString * storyboardName = @"MainStoryboard"; 
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle: nil];
UIViewController * vc = [storyboard instantiateViewControllerWithIdentifier:@"IDENTIFIER_OF_YOUR_VIEWCONTROLLER"];
[self presentViewController:vc animated:YES completion:nil];

IDENTIFIER_OF_YOUR_VIEWCONTROLLER is the name you set in your storyboard. IDENTIFIER_OF_YOUR_VIEWCONTROLLER是您在情节提要中设置的名称。 You can assign in the identity inspector of your storyboard. 您可以在情节提要的身份检查器中进行分配。

This view will cover your screen as a modal 该视图将以模态形式覆盖您的屏幕

暂无
暂无

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

相关问题 如何在标签栏控制器中快速隐藏视图控制器? - how hide a view controller in tab bar controller swift? 无法隐藏子视图控制器中的标签栏 - Cannot hide tab bar in child view controller 如何在标签栏控制器视图内的按钮按下时在标签栏下显示另一个视图控制器? - How to present another view controller under tab bar on button press inside a tab bar controller view? 在标签栏控制器中隐藏当前视图控制器的标签 - Hide tab for current view controller in tab bar controller 如何快速隐藏嵌入在导航堆栈中的视图控制器中的选项卡栏? - how to hide tab bar in the view controller that embedded in the navigation stack in swift? 如何将视图控制器更改为选项卡栏控制器作为根视图控制器 - How to change view controller to tab bar controller as root view controller 单击第一个视图控制器中的按钮时如何通过选项卡栏控制器从一个视图控制器转到另一个视图控制器 - How to go from one view controller to another view controller through tab bar controller when Click a button in the first view controller 如何在标签栏控制器中更新标签上的视图 - How to renew view on tab in tab bar controller 如何在标签栏控制器中从一个视图控制器切换到另一个视图控制器并保留标签栏? - How within a tab bar controller do I segue from one view controller to another and retain the tab bar? 如何在标签栏控制器中从视图控制器中消除父视图? - How to dismiss parent view from View Controller in Tab Bar Controller?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM