Jump to content

- - - - -


  • Please log in to reply
2 replies to this topic

#1 RaduGrama


    Jr. Member

  • STV 5.0 Pro
  • PipPip
  • 29 posts
  • LocationTampa, FL
Reputation: 6

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,


#2 ozie



  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169

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.

#3 Tarek


    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452

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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users