开发者

Cocoa Touch - Changing the text of a button and a label

Well.. I forgot how to change the text of a button and label in cocoa touch.

Please remind me..

IBOutlet id questionLabel;
IBOutlet id answerButtonOne;
IBOutlet id answerButt开发者_JS百科onTwo;
IBOutlet id answerButtonThree;
IBOutlet id answerButtonFour;


UILabel* label;
label.text = @"Foo";

http://developer.apple.com/iphone/library/documentation/uikit/reference/UILabel_Class/Reference/UILabel.html#//apple_ref/occ/instp/UILabel/text

UIButton* button;
[button setTitle:@"Bar" forState:UIControlStateNormal];

http://developer.apple.com/iphone/library/documentation/uikit/reference/UIButton_Class/UIButton/UIButton.html#//apple_ref/occ/instm/UIButton/setTitle:forState:

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜