Closed kong707 closed 10 years ago
Unfortunately this is a problem with CTFramesetter
and thus an issue with Apple CoreText.framework
…
NSAttributedString
and you app support iOS6+ you may instead use UILabel
as it supports NSAttributedString
drawing with UIKit
since iOS6.OHAttributedLabel
like adding custom links or keep support for iOS5, I encourage you to file an issue in bugreport.apple.com
Thanks Ali, I still need to use OHAttributedLabel's features such as custom link for hashtag and url. So I am filing the bug to Apple right now.
This might due to bug from Apple. But I am not sure so I better ask it here.
My app scrolling performance is doing just fine in iOS6 . I have a label using OHAttributedLabel with dynamic height and content. But when I switch to iOS7 SDK. The scrolling performance drop drastically. I use profile tools and notice that the [OHAttributeLabel drawTextInRect] is expensive and causing the lag. This line of code is the problem
CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString(cfAttrStrWithLinks);
But actually, if I try it with English content .Everything is fast. But with foreign text ,it turns out to be very slow. Any suggestions? I also tried to test with different font ( I set the custom uitableviewcell by interface builder) . But when it display the foreign text, it does not change at all.