Tuesday, December 3, 2013

Button to display the text. . Novice advice

Header file reads:
@ Interface ......
{
IBOutlet UIButton * buttonUser;
}
@ Property (nonatomic, retain) IBOutlet UIButton * buttonUser; / /? No error?

. M file where I wrote this:
@ Synthesize buttonUser;

buttonUser.titleLabel = NSLocalizedString (@ "User", nil) ;/ / this displayed value is not the case, ask advice or @ property when it wrong?

Consult code. .
Reply:
 - (void) setTitle: (NSString *) title forState: (UIControlState) state; 

This is a function to set the button text.
Reply:
buttonUser.titleLabel.text
Reply:
cited a floor reply:
C / C + + code

- (Void) setTitle: (NSString *) title forState: (UIControlState) state;

This is a function to set the button text.


Here how to write it?
Reply:
. buttonUser titleLabel.text = @ "aaaaaa"; or [buttonUser.titleLable setText: @ "aaaa"];
Reply:
Upstairs positive solution

No comments:

Post a Comment