I have a UIViewController derived class which uses the method dismissModalViewControllerAnimated:(BOOL)
, like this:
[self dismissModalViewControllerAnimated:YES];
Since the compiler complains with a warning saying that this method is deprecated, I have changed it to the suggested replacement, dismissModalViewControllerAnimated:completion:
, like this:
[self dismissModalViewControllerAnimated:YES completion:nil];
But now, a get an error in that line of code saying "No visible @interface for declares the selector dismissModalViewControllerAnimated:completion:
I can't see what's the problem, since both methods are defined in UIViewController.h, and my class derives from that class.
What am I doing wrong?
Thank you in advance
It was my fault. The new method is
not
Thank you all, and excuse me for my silly question.