user2777252
user2777252

Reputation:

Instance method not found (return type defaults to 'id')

I am taking a warning from Xcode :

Instance method '-presentModalViewController:animated:completion:' not found (return type defaults to 'id')

Here is the code:

    NewsWebViewController *sampleView = [[[NewsWebViewController alloc] init] autorelease];
    [self presentModalViewController:sampleView animated:YES completion:nil];

}

I try your different solution before to you contact, Please considerate my apology, i'm french and i translate with google translate.

In you thanking by advance.

Upvotes: 0

Views: 3529

Answers (2)

rmaddy
rmaddy

Reputation: 318814

Please look at the reference documentation for UIViewController. The name of the method is:

presentViewController:animated:completion:

There is a deprecated method named:

presentModalViewController:animated:

Upvotes: 1

Matthias Bauch
Matthias Bauch

Reputation: 90117

The method is called presentViewController:animated:completion:.

There is no Modal in this selector.

Upvotes: 1

Related Questions