我有一個問題,因爲iOS8和Xcode 6.0.1,我的警報對話框的標題不會出現。所以我改變了我的UIAlertView到UIAlertController,但我有同樣的問題...UIAlertController標題始終爲零與iOS8
我的警報的標題總是爲零,並且顯示非常難看,因爲我沒有serparator行。
你知道我爲什麼這樣嗎?
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"title" message:@"message" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[self dismissViewControllerAnimated:YES completion:nil];
}]];
[self presentViewController:alert animated:YES completion:nil];
不過這是結果
(lldb) po alert.title
nil
(lldb) po alert.message
message
謝謝。
使用Excat相同的代碼,並在這裏 – 2014-10-08 09:22:56
其工作@Bhumit我在另一個清潔工程測試和正常工作太多,但我不知道這可能是在我的實際項目,UIAlertController衝突... – DamienLevel 2014-10-08 09:36:24
這是我的工作 – 2014-10-08 09:43:54