Is there a correct way to set the title of a doneButton? Setting self.doneButton.title in viewDidLoad executes but the property evaluates to nil after the assignment.
Thank you,
Radu
UA-17470720-3
Posted 14 March 2016 - 08:32 AM
Is there a correct way to set the title of a doneButton? Setting self.doneButton.title in viewDidLoad executes but the property evaluates to nil after the assignment.
Thank you,
Radu
Posted 14 March 2016 - 11:41 PM
most likely something like http://stackoverflow...uinavigationbar
viewDidLoad does not have all controls loaded.. usually viewWillAppear or viewDidAppear they have loaded by
P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.
Posted 15 March 2016 - 09:40 AM
STV uses the standard iOS system buttons, in this case it's 'UIBarButtonSystemItemDone'. I believe iOS has designed these buttons to have constant titles, hence the title not changing. You can however completely replace the done button with any custom UIBarButtonItem of your choice, setting both its 'target' and 'action' properties to the same values of the original 'Done' button.
0 members, 0 guests, 0 anonymous users