<分区>
<分区>
我正在创建一个非常基本的 iOS 应用程序。我有一个带有 5 个选项卡的 TabViewController,我想从每个选项卡创建子页面。最好的方法是什么?我应该使用更多选项卡还是可以使用继承选项卡栏的 ViewController?任何帮助将不胜感激!
最佳答案
通过子页面,您是指将新页面推送到堆栈上,还是在当前页面之上呈现新页面?
对于前者,您需要传入 UINavigationController 作为选项卡的 View Controller ,并将该选项卡的原始 View Controller 作为导航 Controller 的 RootViewController。
对于后者,您可以使用当前 View Controller 的presentModalViewController方法来呈现一个新的 View Controller 。
关于iphone - 一个基本的 UITabBar 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12014423/