iPhone 工具栏显示视图
好的,我找不到 UIViewController 调用的呈现新视图的方法。
我有一个基于 UINavigationController 的应用程序。一旦我看到显示对象详细信息的视图,底部就会有 1 个工具栏,这样我就可以为用户提供一些选项。 当他按下 barButtomItem 时,我想显示一个新视图,但不更改导航栏,所以如果我按后退按钮,他会从详细视图返回,而不是从新选项返回。
我知道方法 PushViewController 但不能按我想要的方式工作。
提前谢谢!
编辑:如果我打电话的话,只是为了更清楚 [[self navigationController]pushViewController:loteCompraViewController 动画:YES]; 我得到一个与新控制器相关的新视图,但它也更改了导航栏,这对我来说不好。
ok, i cant find the method called by UIViewController that presents a new view.
i have an app based on UINavigationController. Once i come to a view showing details of the object, i have 1 toolBar at the bottom so i can give some options to user.
When he press on barButtomItem, i want to show a new view but not changing the navigationbar, so if i press back button he goes back from detail view and not from new option.
i know method pushViewController but does not work as i want.
thx in advance!
edit: just to be a more bit more clear if i call
[[self navigationController]pushViewController:loteCompraViewController animated:YES];
i get a new view, related to the new controller but it also changes the navigationbar and that is not good for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为“显示对象详细信息的视图”的视图控制器提供两个方法:
isShowingOverlayView
和dismissOverlayView
。在isShowingOverlayView
中,如果您因为“他按下了 barButtomItem”而显示“新视图”,则返回 YES。在dismissOverlayView
中,隐藏“新视图”。然后创建您自己的 UINavigationController 子类。在您的子类中,重写
popViewControllerAnimated:
以使用对象详细信息视图控制器的这些方法,如下所示:使用此子类而不是标准 UINavigationController。
Give your view controller of the "view showing details of the object" two methods:
isShowingOverlayView
anddismissOverlayView
. InisShowingOverlayView
, return YES if you're showing the "new view" because "he press on barButtomItem". IndismissOverlayView
, hide the "new view".Then make your own subclass of UINavigationController. In your subclass, override
popViewControllerAnimated:
to use those methods of your object-detail view controller, like this:Use this subclass instead of the standard UINavigationController.