UIButton color issues

前端 未结 2 1921
伪装坚强ぢ
伪装坚强ぢ 2020-12-21 07:31

How can I change the color of the text on my UIButton. Here is my current code:

    UIButton *b1 = [[UIButton alloc] init];
    b1.frame = CGRectMake(280,395         


        
2条回答
  •  隐瞒了意图╮
    2020-12-21 08:30

    Try setting the individual events, such as:

    [b1 setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    

提交回复
热议问题