如何更改导航栏默认后退按钮

时间:2015-08-05 14:22:23

标签: ios swift

您好,我无法更改导航栏默认后退按钮的标题

我试过了:

  self.navigationController?.navigationBar.backItem?.title="retour"
        self.navigationController?.navigationItem.leftBarButtonItem?.title="retour"
        self.navigationItem.backBarButtonItem?.title="retour"
        self.navigationItem.leftBarButtonItem?.title="retour"

1 个答案:

答案 0 :(得分:2)

设为leftBarButtonItem

var backBtn : UIBarButtonItem = UIBarButtonItem(title: "retour", style: UIBarButtonItemStyle.Plain, target: self, action: nil)

self.navigationItem.leftBarButtonItem = backBtn