问题描述
我有一个类型为 UITableViewController 的类.这个类有一个 UINavigationBar 类型的成员,我用它来添加表格视图的编辑按钮.
I have a class that is of type UITableViewController.
This class has a member of type UINavigationBar that I use for adding in an edit button for the table view.
使用该方法调用无效.
[self.navigationController pushViewController:controller];
如何在选择表格行后将详细视图推送到视图上而不将 UITableViewController 包装在 UINavigationController 中?
How can I push a detail view onto the view after selecting a table row without wrapping my UITableViewController in a UINavigationController?
推荐答案
如果没有导航控制器,则不能将视图控制器推送到导航控制器上.如果您想要推送控制器并让它显示最顶层的控制器和所有内容,只需使用 UINavigationController 并完成它.
You can't push a view controller onto a navigation controller if there is no navigation controller. If you are wanting to be pushing controllers and have it display the topmost controller and everything, just use a UINavigationController and be done with it.
您可以推送任意UINavigationItems 到您的 UINavigationBar 上,当用户使用后退按钮时,您的 bar 代表将收到通知,以便您采取适当的操作.有关详细信息,请参阅文档.
You can push arbitrary UINavigationItems onto your UINavigationBar, and your bar's delegate will be notified when the user uses the back button so you can take appropriate action. See the documentation for more information.
这篇关于没有导航控制器的 pushViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)