UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"标题" message:@"内容" preferredStyle:UIAlertControllerStyleAlert];
alertController.view.tintColor = [UIColor blueColor];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
//Add image 这里可以给button添加图片
// UIImage *accessoryImage = [UIImage imageNamed:@"selectRDImag.png"];
// accessoryImage = [accessoryImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
// [cancelAction setValue:accessoryImage forKey:@"image"];
[cancelAction setValue:[UIColor lightGrayColor] forKey:@"titleTextColor"];
[cancelAction setValue:[NSNumber numberWithInteger:NSTextAlignmentLeft] forKey:@"titleTextAlignment"];
[cancelAction setValue:[UIColor redColor] forKey:@"imageTintColor"];
[alertController addAction:cancelAction];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:nil];
[okAction setValue:[UIColor greenColor] forKey:@"titleTextColor"];
[alertController addAction:okAction];
//Custom Title
NSMutableAttributedString *hogan = [[NSMutableAttributedString alloc] initWithString:@"Presenting the Hulk Hogan!"];
[hogan addAttribute:NSFontAttributeName
value:[UIFont systemFontOfSize:17]
range:NSMakeRange(0, hogan.length)];
[alertController setValue:hogan forKey:@"attributedTitle"];
NSMutableAttributedString *hogan1 = [[NSMutableAttributedString alloc] initWithString:@"hjasdghjdfsgkfdghfdgsgdsfgdsfg"];
[hogan1 addAttribute:NSFontAttributeName
value:[UIFont systemFontOfSize:15]
range:NSMakeRange(0, hogan1.length)];
[alertController setValue:hogan1 forKey:@"attributedMessage"];
[self presentViewController:alertController animated:YES completion:nil];