[英]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.