How do you deal with deprecated methods in iPhone that require you to use a newer method, not available in older versions?
Consider the case of setStatusBarHidden:animated:
, which was deprecated in iOS 3.2. The documentation points you to use setStatusBarHidden:withAnimation:
, which is only available in iOS 3.2 or later.
If I understand correctly, this means that to target all devices (iOS 3.0 or later), I have to ask first if setStatusBarHidden:withAnimation:
is available. If it is, use it. If not, use the deprecated method. But I would still get a warning of deprecation.
Is this correct (please say it isn't!)? If it is, is there any way to suppress this deprecation warning, or to indicate the compiler that I have already handled the problem?