混合 CATextLayer 和 CAScrollLayer
我需要一个可滚动的 CATextLayer 来显示 NSAttributedString。 有没有办法混合两个图层,或者向 CATextLayer 添加滚动或在 CAScrollLayer 中显示文本?
抱歉,如果问题不太准确。 谢谢!
编辑:我还没有看到 CALayer 是可滚动的。 对不起!
I need a scrollable CATextLayer to display a NSAttributedString.
Is there any way to mix both layers, or to add a scroll to CATextLayer or to display text in a CAScrollLayer?
Sorry if the question isn't very exact.
Thanks!
EDIT: I haven't seen that the CALayer is scrollable.
Sorry!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试将其添加到您的示例中以编程方式滚动图层:
并将其添加到初始化方法的末尾:
Try adding this to your example to scroll the layer programmatically:
and add this at the end of the initialize method:
CALayer(和 CATextLayer)可以滚动
CALayer (and CATextLayer) can be scrolled