Closed bcylin closed 10 years ago
I'll have a look at the code in the following days, but right now, I'm just too busy. But thanks again for your contribution!
No problem, take your time!
I have cherry-picked some of your code and added some stuff myself. Multiline now works on iOS 6 although adjustsFontSizeToFitWidth
still doesn't. Check out master
at
fe76662f749812059094717bd23795f2f5a8b49a and see if it works ;)
master
works all right! :+1: The way to achieve multiline-label in 182c70a80ba6734ef13695cacc91dc7056c5b504 is much better than adding an additional hight constraint on textLabel.
So this pull request should be okay to close?
I would still prefer some way to get adjustsFontSizeToFitWidth
working on iOS 6. I guess one has to implement the shrinking oneself. Something like this although I'm not sure how to get this stuff working with auto layout.
I guess in some post-layout
method, the font size for the label has to be calculated again, but only on iOS 6. Could have performance implications, too.
Would you try to implement something that pays attention to all the points mentionend above?
I replaced the unnecessary commit with your _textLabel configuration cherry-picked, tried to manually resize font when layoutSubviews
in iOS 6. Please try it out, thanks!
I merged the commit and made some minor changes a9054c5c803a13055a0267d8188c0615f4bb58f1
. Please test and check if everything works.
Everything seems to be working fine. Let's close this!
This is probably just a temporary adjustment since most apps might drop support for iOS 6 by the end of this year. So I merely altered some iOS-7-only methods instead of making changes to the UIToolbar layers mentioned in #29.
Unfortunately, UILabel
adjustsFontSizeToFitWidth
doesn't work well in iOS 6.But I think that won't cause too much trouble.