0

UIAlertControllerandのデフォルトのスタイルを使用していますUIAlertActionが、スクリーンショットのように白い背景に白いテキストが表示されます

これが私のコードです:

UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"0237826726" style:UIAlertActionStyleDefault
                                                              handler:^(UIAlertAction * action) {
                                                                    [self callPlaceNumber:@"0237826726"];
                                                              }];
[alert addAction:defaultAction];

UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault
                                                   handler:^(UIAlertAction * action) {
                                                       [alert dismissViewControllerAnimated:YES completion:nil];
                                                   }];

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

tintColor問題を検索したところ、次のように追加できることがわかりましたが、機能UIAlertControllerしませんでした。

alert.view.tintColor = [UIColor blackColor];

これは正常な動作ですか、それとも私のコードに何か問題がありますか?

4

1 に答える 1