我正在尝试将UIAlertController添加到我的应用程序,但它根本没有出现.我尝试过以下方法:
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Message" message:@"Web Service is not available." preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction* ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; [alertController addAction:ok]; [self presentViewController:alertController animated:YES completion:nil];
但这根本没有出现,我做错了什么?