如何在详细视图中使用导航控制器设置 UISplitView
所以刚刚完成了本教程:
http://icodeblog。 com/2010/04/05/ipad-programming-tutorial-hello-world/
现在我想做的是将详细视图设置为导航控制器。问题是如何?
我的第一个倾向是让 DetailViewController 扩展 UINavigationContoller。这是最好的方法吗?如果是这样,控制器数组是否会进入 DetailViewController?
欢迎评论、想法、教程。谢谢。
So just went through this tutorial:
http://icodeblog.com/2010/04/05/ipad-programming-tutorial-hello-world/
Now what I want to do is setup the detail view as a navigation controller. The question is how?
My first inclination is to have the DetailViewController extend a UINavigationContoller. Is that the best approach? If so does the array of controllers go into the DetailViewController?
Comments, ideas, tutorials are all welcome. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,柴坦亚是对的;您可以将导航控制器添加到来自 xib 的拆分视图,也可以以编程方式创建拆分视图,例如:
现在您将在详细视图中拥有导航控制器。
您可以在此处下载工作代码。
Yes, chaitanya is right; You can add navigation controller to split view from xib or you can create split view programmitically, like:
so now your will have navigation controller in detail view.
You can download the working code here.
解决方案:
http://kshitizghimire.com.np/uisplitviewcontroller-multipledetailviews-with -导航控制器/
The solution:
http://kshitizghimire.com.np/uisplitviewcontroller-multipledetailviews-with-navigation-controller/
更好的方法是在界面 nib 中为详细视图添加导航控制器,就像我们为根视图控制器添加的方式一样。
the better approach would be adding a navigation controller for the detail view in interface nib just like how we will add for root view contrller.