Reputation: 483
I´m just a beginner in Swift and i don´t get it. Why doesn't change the title of my backBarButtonItem after the push segue?
I tried it with this code in the viewDidLoad:
navigationItem.backBarButtonItem?.title = "Back"
Can somebody help me?
Upvotes: 0
Views: 401
Reputation: 37189
Use !
not ?
. !
is used for getting value from optional or unwrapping the optional
self.navigationItem.backBarButtonItem!.title = "Back"
Upvotes: 1