我正在尝试使用 CoreText,我遇到的问题之一是内容不可滚动,并且不知道如何使其可滚动......使用标签此代码有效:
//Calculate the expected size based on the font and linebreak mode of your label
CGSize maximumLabelSize = CGSizeMake(300,9999);
CGSize expectedLabelSize = [labelText sizeWithFont:label.font
constrainedToSize:maximumLabelSize
lineBreakMode:UILineBreakModeTailTruncation];
//adjust the label the the new height.
CGRect newFrame = label.frame;
newFrame.size.height = expectedLabelSize.height;
label.frame = newFrame;
我的测试项目:http ://dl.dropbox.com/u/47384598/AA_CoreText.zip
但是我应该如何处理 CoreText?任何帮助都非常感谢!