[英]I wanna show TABBAR controller in modal view from 1 tab
I made a tabbar-based controllers with 5 tabs and at 1st tab, there's a button to call a modal view. 我制作了一个基于标签栏的控制器,其中包含5个选项卡,在第一个选项卡上,有一个按钮可以调用模式视图。
but when a modal view showed up, there's no tabbar on it. 但是当出现模式视图时,它上面没有标签栏。
How do I show a tabbar at that presented modal view ? 如何在显示的模式视图中显示标签栏?
For example if FirstViewController is the first viewController for your first tabbar, you should do like this: 例如,如果FirstViewController是第一个选项卡栏的第一个viewController,则应这样做:
[FirstViewController.view addSubview:theViewYouWantToShow]; [FirstViewController.view addSubview:theViewYouWantToShow];
If you'll call a viewController
using presentModelViewController
, it'll hide the tabbar of the application. 如果使用
presentModelViewController
调用viewController
,它将隐藏应用程序的viewController
。 You can use either of 2 way: 您可以使用以下两种方式之一:
navigationController
in first tab
and push
anotherViewController
(without animation if you don't wanna show push effect) tab
设置navigationController
并push
anotherViewController
(如果您不想显示推送效果,则无需动画) anotherViewController.view
as subView on firstViewController
anotherViewController.view
作为子视图firstViewController
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.