View Full Version : Setting a Buttons title
iphonedevelop18
Mar 28, 2009, 02:07 AM
Sorry for the noob question but I cannot figure out how to set a Buttons text
I tried using "button.text" and "button.title."
Thanks
dejo
Mar 28, 2009, 08:39 AM
Did you try looking at the class reference for UIButton? Especially around the setTitle instance methods?
iphonedevelop18
Mar 28, 2009, 06:53 PM
yes, i made sure to look at those thoroughly before posting and I didnt see it.
mccannmarc
Mar 28, 2009, 07:55 PM
yes, i made sure to look at those thoroughly before posting and I didnt see it.
so you didn't see setTitle: forState:? hmmm you obviously weren't looking very hard. Anyway its used like [<nameOfButton> setTitle:@"Whatever" forState:UIControlStateNormal]; if you want to set the title of the button in general
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.