this may be a little bit of a dump question but how do you handle backwards compatibility facing all the depreciations in iOS6? I’m currently unsure how to handle them myself.
Examples:
UITextAlignment is deprecated, but using NSTextAlignment will not work on devices using iOS 5 and prior
dismissModalViewControllerAnimated: is deprecated as well in favor of dismissViewControllerAnimated: completion:
So how could/should one maintain compatibility to older iOS versions? Are there ways to test older versions in XCode 4.5 simulator?
Thanks for any advice!
To get all deprecated methods in your code just set the deployment target of you application to iOS 6.0, and compile your code, then you will get a warning for each deprecated method.
In order to solve the deprecation use one of the following:
1-
2- USer
respondToSelectermethod to detect if the object respond to such selector.