后退按钮不会出现在navigationController中 [英] Back button don't appear in navigationController
问题描述
我有一个带有navigationController的UIViewController,我隐藏了后退按钮。这个viewController推送另一个UIViewController,并在这个新的viewController的viewDidLoad中,我做:
I have a UIViewController, with a navigationController, and I hide the back button. This viewController push a other UIViewController, and in the viewDidLoad of this new viewController, I do:
self.navigationItem.hidesBackButton = FALSE;
但后退按钮不会发生。为什么?当我转到iOS 4.2的新Xcode版本时,这不起作用,因为在最新版本中,它一切正常。
But the backbutton doesn't happear. Why? And this don't work when I pass to the new Xcode version for iOS 4.2, because in the latest version, it all works well.
推荐答案
以前的navigationController是否有标题(在导航栏上)?有时,如果没有标题,则会自动隐藏第一个后退按钮。
Is there a title for the previous navigationController (on the navigation bar)? Sometimes, if there is no title, the first back button is hidden automatically.
这篇关于后退按钮不会出现在navigationController中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!