我有问题,我有3个观点,
我将第一个视图转到第二个并希望更改我的后退按钮标题
我在第二视图的viewDidLoad中编写此代码,但它不起作用:(
UIBarButtonItem *backButton = [[UIBarButtonItem alloc]initWithTitle:@"Back" style:UIBarButtonItemStyleDone target:nil action:nil];
[self.navigationItem setBackBarButtonItem:backButton];
答案 0 :(得分:1)
转到第一个视图控制器并在推送viewController之前添加以下代码,
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Inv Menu" style:UIBarButtonItemStylePlain target:nil action:nil];
self.navigationItem.backBarButtonItem = backButton;
[backButton release];