你好我有点问题.
我有一个项目的应用程序,但它是一个有点旧的应用程序(IOS 7).
我在互联网上看到如何使用好的旧UIAlertView的INSTEAD更新UIAlertController.
if (error.code) {
cancelBlock = block;
UIAlertController *alert = [UIAlertController alertControllerWithTitle: @"Message"
message: @"Peripheral Disconnected with Error"
preferredStyle: UIAlertControllerStyleAlert];
UIAlertAction *alertAction = [UIAlertAction actionWithTitle: @"OK"
style: UIAlertActionStyleDestructive
handler: ^(UIAlertAction *action) {
NSLog(@"OK");
}];
[alert addAction: alertAction];
[self presentViewController: controller animated: YES completion: nil];
/* UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Peripheral Disconnected with Error"
message:error.description
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];*/
Run Code Online (Sandbox Code Playgroud)
我收到一个我不明白的错误:
'RFduino'没有可见的@interface声明选择器'presentViewController:animated:completion'