Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

presentModalViewController:animated is deprecated

I am getting a warning in XCode:

'presentModalViewController:animated:' is deprecated: first deprecated in iOS 6.0

on this line of code:

[self presentModalViewController:initialSettingsVC animated:YES];

I tried to replace it as suggested in the documentation with:

[self presentModalViewController:initialSettingsVC animated:YES completion:nil];

I now get an error in XCode:

No visible @interface for 'ViewController' declares the selector 'presentModalViewController:animated:completion:'

Any ideas?

like image 539
poiuytrez Avatar asked Jun 11 '13 15:06

poiuytrez


1 Answers

Replace

[self presentModalViewController:initialSettingsVC animated:YES completion:nil];

To

[self presentViewController:reader animated:YES completion:nil];
like image 65
Ahmed Talaab Avatar answered Sep 18 '22 15:09

Ahmed Talaab