UA-17470720-3

Jump to content


Photo
- - - - -

doneButton.title


  • Please log in to reply
2 replies to this topic

#1 RaduGrama

RaduGrama

    Jr. Member

  • STV 5.0 Pro
  • PipPip
  • 29 posts
  • LocationEl Paso, TX
Reputation: 5
Good

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



#2 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 511 posts
  • LocationAustralia
Reputation: 162
Popular

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

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 443
Popular

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