我现在正在开发ios 6的应用程序。这是一种表单设计应用程序,我发现如果我们在应用程序中更改titlelabel.textColor
某个点,那么如果我们更改字体,textColor将在分配时更改为默认值。 我检查这个像下面设置UIButton的titleLabel字体会将textColor更改为默认值?
我拖累样本按钮,我的样本视图 - 控制和创造-viewDidLoad
[myButton.titleLabel setTextColor:[UIColor redColor]];
,并在按钮的动作我不喜欢在下面viewcontroller.h文件 名为myButton
一个IBOutlet属性下面
- (IBAction)btnLoginClicke:(UIButton *)sender {
[myButton.titleLabel setFont:[UIFont fontWithName:@"Arial" size:18]];
是我之前和之后的按钮点击动作截图