Saturday, 31 August 2013

deprecated warnings in xcode and how to handle depracation

deprecated warnings in xcode and how to handle depracation

if ([self
respondsToSelector:@selector(dismissViewControllerAnimated:completion:)])
{[[self presentingViewController] dismissViewControllerAnimated:YES
completion:nil];} //post-iOS6.0
else {[self dismissModalViewControllerAnimated:YES];} //pre-iOS6.0
I'm doing the responds to selector (above) code to handle deprecated
methods. That way my app is compatible with older versions of iOS, but I'm
getting warnings in my code stating:
"'dismissModalViewControllerAnimated:' is deprecated: first deprecated in
iOS 6.0" I personally don't like any warning in my code, but more
importantly, I read somewhere that apple will complain about warnings in
your code.
1) Will Apple complain about warnings in your code?
2) Am I handling deprecated methods correctly?
3) Is there way to turn deprecated method method warnings off?

No comments:

Post a Comment