declares the selector presentviewcontroller

Viewed 7055

Hello I have a little problem.

I got an application for a project, but it is a somewhat old application (IOS 7).

I saw on the internet how to update the UIAlertController Using INSTEAD of good-old UIAlertView.

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];*/

I get an error that I do not understand:

No visible @interface for 'RFduino' declared the selector 'presentViewController: animated: completion'

2 Answers
Related