简体   繁体   English

更改导航项后退按钮标题

[英]Change navigation item back button title

How to change < Wish list button on something different? 如何更改< Wish list按钮上的其他内容? 在此处输入图片说明

you can use the following code if any error then tell me 如果有任何错误,您可以使用以下代码,然后告诉我

-(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:YES]; -(void)viewWillAppear:(BOOL)动画{[super viewWillAppear:YES];

UIBarButtonItem *flipButton = [[UIBarButtonItem alloc]
                               initWithTitle:@"Pending"
                               style:UIBarButtonItemStyleBordered
                               target:self
                               action:@selector(flipView)];

self.navigationItem.leftBarButtonItem = flipButton;

} -(void)flipView { } }-(void)flipView {}

Try this, 尝试这个,

let newBackButton = UIBarButtonItem(title: "SomeOtherTitle", style: UIBarButtonItemStyle.Bordered, target: self, action: "back:")
self.navigationItem.leftBarButtonItem = newBackButton;

func back(sender: UIBarButtonItem) {
    self.popViewControllerAnimated(true, completion: nil)
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM