Re: UIButton label
Re: UIButton label
- Subject: Re: UIButton label
- From: DKJ <email@hidden>
- Date: Tue, 27 Oct 2009 12:50:08 -0700
I'm doing this instead:
[self.updateButton setTitle:dateDisplay
forState:UIControlStateNormal];
and it works. But I'd still like to know why the other code didn't.
dkj
On 2009-10-27, at 12:43 , DKJ wrote:
I'm having a ridiculous amount of trouble changing the text of a
UIButton title. I have the button connected to the file's owner (a
UIViewController) in IB, and I've defined this property:
@property(nonatomic,retain) IBOutlet UIButton *button;
The button's action method works, so I know the connections are OK.
I put this in the controller's viewWillAppear: method:
self.button.titleLabel.text = @"Why won't this work?";
and the button remains blank. (No text is set for the button in IB.)
I've put an NSLog in the viewWillAppear: method, so I know it's
being called.
Why won't this work?
dkj
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
=====================
Hatzic Intellectual Software
Victoria BC, Canada
www.hatzicware.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden