How to change font size and color of UIAlertAction in UIAlertController

后端 未结 4 1561
孤独总比滥情好
孤独总比滥情好 2021-01-06 17:57

In the image above how to change the font size and color of \"Done\", \"Some Other action\"? and how to change the font size and color of \"title\", and \"message\"

4条回答
  •  耶瑟儿~
    2021-01-06 18:11

    Simply do like this

        UIAlertAction * action = [UIAlertAction actionWithTitle:@"ACTION TITLE" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
    
           // TODO : ACTION
        }];
    
        [action setValue:[UIColor redColor] forKey:@"titleTextColor"];
        [alertController action];
    

提交回复
热议问题