我像这样启动了我的按钮:
meetingPointButton = [UIButton buttonWithType:UIButtonTypeCustom];
[meetingPointButton setTitle:@"Alpha" forState:UIControlStateNormal];
[meetingPointButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
之后我更改了它的标题,这样做时还想更改标题颜色。我正在使用以下代码:
[meetingPointButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[meetingPointButton setTitle:@"Beta" forState:UIControlStateNormal];
标题更改为“Beta”,但其颜色仍为浅灰色。任何想法如何解决这个问题?