【发布时间】:2021-02-25 04:23:22
【问题描述】:
我有一个 Objective C 项目并想向用户显示一些警报,在某些 iPad 上 UIAlertController 按钮不可见,我在下面附上了一张图片。 有人遇到过这样的问题吗?有什么解决方法吗?
设备详情 iOS 14.4 iPad 空气 2
使用的示例代码
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@“Alert” message:@“Message” preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *yesAction = [UIAlertAction actionWithTitle:@“YES” style:UIAlertActionStyleDefault handler:^(UIAlertAction * action){
}];
UIAlertAction *noAction = [UIAlertAction actionWithTitle:@“NO” style:UIAlertActionStyleDefault handler:^(UIAlertAction * action){
}];
[alert addAction:yesAction];
[alert addAction:noAction];
[alert show];
图片
【问题讨论】:
-
请确保您曾经使用任何类别替换颜色或全局使用任何色调颜色来更改按钮,
-
正是我的问题!我们客户的大约 1500 台 iPad 运行良好,只有一台 iPad mini 显示空按钮。仅当我更改某些辅助功能设置(例如“对比度”)时,我才能重现该问题。但我仍然不知道出了什么问题......
标签: ios objective-c uialertcontroller