iOS CATextLayer wrapped doesn't work as expected
I have a CATextLayer with multiline Text. The wrapped option is set to YES. But it doesn't wrap the text on the last line. If I add another line with n and a space, the wrapping occurs (but this destroys the layout).
This only happens in iOS >= 8.3
Any ideas what could cause this?
Something in CATextLayer
has changed in iOS 8.3 which means that you now need to add 1px more to the height than you did before. If you were using CTFramesetterSuggestFrameSizeWithConstraints
then this now totals to 2px additional height.
It's an odd breakage but there's not much that can be done about that.
链接地址: http://www.djcxy.com/p/88002.html