繁体   English   中英

更改导航项后退按钮标题

[英]Change navigation item back button title

如何更改< Wish list按钮上的其他内容? 在此处输入图片说明

如果有任何错误,您可以使用以下代码,然后告诉我

-(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 {}

尝试这个,

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