2016-10-04 13 views
1

私たちのアプリの1つにアラートがあり、UIAlertViewを使用していました。 UIAlertViewはiOS9で廃止されたため、UIAlertViewからUIAlertController(iOS8から入手可能)に更新しました。最近では、警告ボタンが空白になることがあるというお客様からの質問がありましたが、いずれの場合でもタイトルが表示されているかどうかにかかわらず、ボタンは期待通りに機能しています。UIAlertController - アラートに空白のタイトルを表示

デバイス:iPadのミニ(第一世代) OSバージョン:iOS9

だから、何がアラートボタンの時々のブランクを示すの問題だろうか?

+0

です。 – Connor

+1

tintColorを変更します。あなたのアプリケーションは、これらのUIAlertControllerキャッチよりも白いtintColorを持っている必要があります。 –

+0

アラートビューのコントローラのボタンのアクションコードを表示 – user3182143

答えて

0

私は

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Show Actions" message:@"Action Title" preferredStyle:UIAlertControllerStyleAlert]; 

UIAlertAction *save = [UIAlertAction actionWithTitle:@"SAVE" style:UIAlertActionStyleDefault handler:nil]; 
[alertController addAction:save]; 

UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"CANCEL" style:UIAlertActionStyleDefault handler:nil]; 
[alertController addAction:cancel]; 

UIAlertAction *ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; 
[alertController addAction:ok]; 

[alertController addAction:ok]; 
[alertController addAction:save]; 
[alertController addAction:cancel]; 

[self presentViewController:alertController animated:YES completion:nil]; 
完璧one.Itが動作するサンプルを試してみました出力結果は、アクションのタイトルを設定してコードを表示

enter image description here

+0

お客様は、あなたのコードの "tintColor"プロパティをチェックしたり、StoryとXibsで調べたりできます。 –

+0

私の答えを試しましたか? – user3182143

+0

私は既に同じコードを使用していますが、テキストは異なります;)BTW、毎回問題が再現されないので、それは毎回ではありません。修正を確認するのも少し難しいです:( –

関連する問題