IOS perform segue from tab bar item

寵の児 提交于 2019-12-18 09:38:29

问题


I have a Tab bar controller with 2 items. The first item is a VC which contains a table view. Clicking on a cell, performs a segue to some other view controller (not an item on the tab bar controller).

The problem is that it removes the tab bar when segue completes. How can I just replace the item 1 with other VC and still keep the tab bar in the bottom?


回答1:


You need to embed your Item1VC to NavigationController so that when you push from ItemVCto MoviesViewController it will not remove the tabbar, if you doesn't embed the NavigationController then it will push from the main ViewControllerin your case it is TabbarController so that you are not able to see the tabbar.



来源:https://stackoverflow.com/questions/39305631/ios-perform-segue-from-tab-bar-item

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!