问题描述
我有一个类型为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.
你可以推送任意到您的UINavigationBar,你的酒吧当用户使用后退按钮时,将通知委托,以便您采取适当的措施。有关详细信息,请参阅 。
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没有navigationcontroller的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!