问题描述:

I am not sure what is happening. When i browse from ViewController to DetailViewController and with the back button to ViewController again, the navigation item "Title main" is empty or seems to be empty??

I also tried

 override func viewDidLoad() {

super.viewDidLoad()

self.title = "Title main"

A/ On main view controller I see the title item

B/ Navigation item title is empty on return??

网友答案:

Try setting the title in:

override func viewWillAppear(animated: Bool) {
    navigationItem.title = "Title main"
}

Let me know if that helps

相关阅读:
Top