When a method can only be used for some versions of iOS, I usually check its availability with respondsToSelector:.
With an announcement, const CGFloatthis is not possible.
The specific constant I'm trying to use is this UIFontWeightBlack, which is defined as:
UIKIT_EXTERN const CGFloat UIFontWeightBlack NS_AVAILABLE_IOS(8_2);
What is the best way to check if the iOS version of my code supports this constant?
Also, if I want to support the creation of my framework with older versions of the iOS SDK, what is the best way to check at compile time if the SDK used offers this symbol?
I am currently checking with
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_2
Is there a way to test for a character directly without relying on / explicitly specifying the iOS SDK version?