开发者

How check font lineHeight ( font.lineHeight) is deprecated or not using API (with out checking OS versions)

开发者 https://www.devze.com 2023-01-19 06:09 出处:网络
I want to checklineHeight property of font isis deprecatedor not u开发者_开发问答sing respondsToSelector . As respondsToSelector takes only method name .. how can i assign property to it ?? First, che

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

精彩评论

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

关注公众号