iPhone NSString drawAtPoint linebreakmodeWordWrap

发布于 2024-09-02 04:20:02 字数 267 浏览 4 评论 0原文

由于我的 tableView 滚动速度非常慢,所以我现在尝试使用直接绘制方法,类似于 Tweetie App 示例或 Apples TableViewSuite 代码。

所以现在我正在努力用不止一行来绘制 NSString 。 我正在使用 [NSString drawAtPoint: forWidth: withFont: linebreakMode:] 方法,它“打破”该行,但它不显示第二行,它只是剪切其余的行串掉。

这是正常行为吗?多行的解决方案是什么?

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 cuts the rest of the string off.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忆悲凉 2024-09-09 04:20:02

尝试使用:

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

Try using:

[yourString drawInRect:(CGRect)rect withFont:(UIFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文