Я обновил XCode 6.0.1, iOS 8.0 и после этого использовал UIAlertController
вместо UIAlertView
, но заголовок для UIAlertController
не появляется. Для справки см. код:
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"AlertView" message:@"Please Click" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action)
{
}];
UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action)
{
[alert dismissViewControllerAnimated:YES completion:nil];
}];
[alert addAction:defaultAction];
[alert addAction:cancel];
[self presentViewController:alert animated:YES completion:nil];
UIAlertController
как список действий, а не как представление предупреждений. - person rmaddy   schedule 22.09.2014