UIAlertController字体颜色

 UIAlertController *alertController = [[UIAlertController alloc] init];
    UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
    UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"你丫的" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        NSLog(@"你丫的点击");
    }];
//给字体设置为橘黄色
    [action1 setValue:[UIColor orangeColor] forKey:@"_titleTextColor"];
    [alertController addAction:cancel];
    [alertController addAction:action1];
    [self presentViewController:alertController animated:YES completion:nil];

你可能感兴趣的:(UIAlertController字体颜色)