A -> B,大概有2种方法:
1)在push的时候,在A中添加代码:
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init]; backItem.title = @"你的文字"; self.navigationItem.backBarButtonItem = backItem;
2)在B中添加代码:
UIBarButtonItem *item = (UIBarButtonItem *)self.navigationController.navigationBar.topItem; item.title = @"你的文字";
时间: 2024-10-13 04:06:23