How check font lineHeight ( font.lineHeight) is deprecated or not using API (with out checking OS versions)
I want to check lineHeight
property of font is is deprecated or not u开发者_开发问答sing respondsToSelector
. As respondsToSelector
takes only method name .. how can i assign property to it ??
First, check the documentation for the property. If it doesn't specify a custom getter, the method name is the same as the property name.
if ([myFont respondsToSelector(lineHeight)]) { ...
See the section labeled "Accessor Method Names" in Apple's Objective-C Programming Language document for more details on getter and setter names for declared properties.
精彩评论