屏幕旋转时,后退按钮变为根视图控制器

Back button changes to Root View Controller when screen rotated

嘿,我在 UIViewController 中有一个 UIWebView。我也在使用 UINavigation 控制器。当纵向定向时,导航栏上的后退按钮会显示“返回”,但当我转到横向时,它会显示“根视图控制器”。知道为什么会发生这种情况以及如何更改它吗?任何指针将不胜感激!

试试这个:

self.navigationItem.backBarButtonItem =
  [[[UIBarButtonItem alloc] initWithTitle:@"Back"
           style: UIBarButtonItemStyleBordered
           target:nil
           action:nil] autorelease];

来源:http://blog.evandavey.com/2008/12/how-to-change-text-on-back-button-in-uinavigationbar-uinavigationcontroller.html