开发者

iPhone NSString drawAtPoint linebreakmodeWordWrap

开发者 https://www.devze.com 2022-12-31 11:10 出处:网络
Since I had a very slow scrolling tableViewI\'m now trying to catch up with the direct draw method, similiar to the Tweetie App sample or Apples TableViewSuite code.

Since I had a very slow scrolling tableView I'm now trying to catch up with the direct draw method, similiar to the Tweetie App sample or Apples TableViewSuite code.

So right now I'm struggling to draw NSString with more than one line. I'm using the [NSString drawAtPoint: forWidth: withFont: linebreakMode:] method, and it "breaks" the line, but it doesn't show the second line, it just cu开发者_Python百科ts the rest of the string off.

Is this a normal behavior and what can be the solution to multiple lines?


Try using:

[yourString drawInRect:(CGRect)rect withFont:(UIFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号