MonoTouch:如何添加UITabBarController
对接线控制器有点困惑,我需要一些帮助
来创建一个新的 Monotouch 项目(主细节)。现在,当我单击表格视图时,我想加载带有选项卡栏的新视图。因此,我双击 DetailViewController.xib,然后拖放一个新的 UITabBarController
。但是我如何指定我希望显示这个新创建的选项卡栏,而不是原来的空视图?
或者,如果我在同一个 .xib 中有另一个选项卡栏,如何指定在加载 DetailViewController 时启动哪个选项卡栏?
顺便说一句,我尝试更改 DetailViewController 类以从 UITabTarController
继承,但随后我看到一个没有选项卡的空黑屏,而不是 XCode 中已创建的两个选项卡。
A bit confused with wiring controllers, I need some help
I create a new Monotouch project (Master-Detail). Now, when I click on the tableview, I want to load a new view with a tabbar. SO I double-click on the DetailViewController.xib, and drag-drop a new UITabBarController
. But how do I specify that I want this newly created tabbar to be displayed, instead of the empty view originally there?
Or if I had another tabbar in the same .xib, how do I specify which one to launch when the DetailViewController gets loaded?
Btw, I tried changing the DetailViewController class to inherit from UITabTarController
, but then I see an empty black screen with no tabs, as opposed to the two tabs already created in XCode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用的是
UINavigationController
吗?在您的 AppDelegate FinishedLaunching() 方法中,您将具有如下代码:
否则您可以跳过 UINavigationController 位。您已阅读 MonoTouch 站点上的所有教程吗?
Are you using a
UINavigationController
?In your
AppDelegate FinishedLaunching()
method you would have code like:else you can just skip the
UINavigationController
bit. You've read all the tutorials at the MonoTouch site?