Text sizes calculated using deprecated methods
sizeWithFont will be deprecated in iOS 7; furthermore, the behavior now is a little bit different: a label having empty text has still height > 0. Before this wasn't happening.
Please refer to commit de3b6426731e2b09270f941ebbed5220e76bf327
Thank you for bringing this up. The code you referenced can't be directly applied as it's currently, as it's using iOS 7 only API, which would brake backwards compatibility. Some more thought (conditional code) will need to be put into this.
You are correct, I didn't notice that boundingRectWithSize was a iOS 7 only method.
How can we check whether that method exists in iOS 6? How can we switch to the proper method at run-time? I guess this is not really possible (unless we use NSInvocation).
respondsToSelector: would be one way to sniff out available functionality
Yes. I'll push some iOS 7 related fixes soon.
On 30. jun. 2013, at 19:54, Cory Metcalfe [email protected] wrote:
respondsToSelector: would be one way to sniff out available functionality
— Reply to this email directly or view it on GitHub.
Here's my take on this. Currently still in a side branch. I decided to use preprocessor macros instead of respondsToSelector:, since the later wouldn't prevent the deprecation warnings when setting a deployment target to iOS 7 or later.
This has been fixed a while ago.