Overriding deprecated UIKit methods. Can I get a warning?

Apple sometimes denounces methods in UIKit that you must override (for example, [UIViewController shouldAutorotateToInterfaceOrientation:] in iOS 6).

Unfortunately, once you change the deployment target to a version in which it is completely deprecated, there is no warning / error, even if the method is deprecated and will never be called ... ever.

If you call an obsolete method, you get a warning, but not if you override it.

I would like to find all of my obsolete methods that I override so that I can clear them over time.

Is there an easy way to do this?

Thanks, -Vince

+4
source share
1 answer

You should see warnings about using legacy features.

There is an article here that they are included in Xcode, but it's pretty old: http://blog.mro.name/2010/06/xcode-missing-deprecated-warnings/

Here is a screenshot of Xcode 4.5:

Here's a screenshot from Xcode 4.5 when the Project -> Target is selected:

0
source

Source: https://habr.com/ru/post/1437710/


All Articles