Changing navigation title programmatically

后端 未结 14 2213
长情又很酷
长情又很酷 2020-11-28 19:34

I have a navigation bar with a title. When I double click the text to rename it, it actually says it\'s a navigation item, so it might be that.

I\'m trying to change

14条回答
  •  爱一瞬间的悲伤
    2020-11-28 19:56

    The correct answer for people using swift4 would be

    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationItem.title = "Your Text"
    }
    

提交回复
热议问题