最佳答案
您可以根据需要设置 Alpha,这在任何情况下都会产生一定的透明度。
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Alert title" message:@"Alert message" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil];
[alertController addAction:ok];
alertController.view.backgroundColor = [UIColor colorWithWhite:1 alpha:0.6];
[self presentViewController:alertController animated:YES completion:nil];
关于ios - 如何增加 UIAlertAction 中的 Alpha?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34713994/