开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜