alertView 操作按钮在 ios 7 之前都是蓝色的
但在 iOS 8 上,“确定”和“取消”为白色。
请找到创建警报 View 的代码块
+(UIAlertView*)showWithMessage:(NSString*)message withTitle:(NSString*)title {
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:title
message:message
delegate:nil
cancelButtonTitle:tibbrLocalizedString(@"all_view.ok.button", @"Ok button title for alert")
otherButtonTitles:nil];
[alert show];
return alert;
}
最佳答案
这是 UIAlertView 的默认行为。如果您需要任何自定义,您可以使用任何自定义 alertview 库,例如,
https://github.com/warrenm/AHAlertView
注意:UIAlertView 遵循 iOS 7.0 Onwards 的白色主题 https://developer.apple.com/library/ios/documentation/userexperience/conceptual/MobileHIG/Modal.html#//apple_ref/doc/uid/TP40006556-CH64-SW1
关于iOS 8 Alertview 操作按钮颜色为白色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25843417/