0
我有一個UIButton
以編程方式創建。未設置UIButton文本顏色
UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setFrame:CGRectMake(0,0,160, 160)];
[button setBackgroundImage:[UIImage imageNamed:@"button.png"] forState:UIControlStateNormal];
[button setTitle:@"title" forState:UIControlStateNormal];
button.titleLabel.font = [UIFont fontWithName:@"arial" size:20];
button.titleLabel.textColor = [UIColor colorWithRed:19/255.0f green:73/255.0f blue:17/255.0f alpha:1];
除了設置textColor
之外,一切工作原理。任何想法爲什麼?
完美 - 感謝 – RGriffiths
不客氣! – plu