Objective c 目标c-为什么警报和行动表';当iphone设置为“s”时,s按钮文本消失;“颜色变深”;已打开

Objective c 目标c-为什么警报和行动表';当iphone设置为“s”时,s按钮文本消失;“颜色变深”;已打开,objective-c,text,alert,Objective C,Text,Alert,我的问题是: 当我打开“设置”时 “常规”-“可访问性”-“增加对比度”-“颜色变暗” 然后打开应用程序 按钮的警报和行动表文本消失(如上图所示), 如果我现在关闭“加深颜色”,它仍然会消失 但是如果我关闭“深色”然后打开应用程序, 这很正常 这是我的代码: UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"你確定要撥打?" preferredStyle:UIAlertCont

我的问题是:

当我打开“设置”时 “常规”-“可访问性”-“增加对比度”-“颜色变暗” 然后打开应用程序 按钮的警报和行动表文本消失(如上图所示), 如果我现在关闭“加深颜色”,它仍然会消失

但是如果我关闭“深色”然后打开应用程序, 这很正常

这是我的代码:

UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"你確定要撥打?" preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"確定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action)
                           {
                               [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:xxxx-xxx-xxx"]];
                           }];
[alert addAction:okAction];
[alert addAction:cancelAction];

[self presentViewController:alert animated:YES completion:nil];


我遇到了这个。我们在自己的
ui窗口
中显示警报,设置窗口的淡色导致了此问题

alertWindow.tintColor=UIApplication.shared.delegate?.window???.tintColor
删除上面的行为我解决了这个问题。
也许您正在某处设置主窗口的色调颜色

运气好吗?这里也有同样的问题。