在 CALayer 上绘制可滚动文本
我有 CALayer 的图形上下文,我想在“滚动视图”内绘制文本。我能够很好地绘制文字;然而使其可滚动更困难。
由于其他原因我无法使用 UIScrollView...有没有办法将可滚动文本绘制到 calayer 上?
I have the graphics context of a CALayer, and I would like to draw text inside of a "scrollview". I'm able to draw text just fine; however making it scrollable is harder.
I can't use UIScrollView for other reasons... is there anyway to draw scrollable text onto a calayer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能没有办法避免使用滚动视图,因为这是支持滚动的主要控件类。所有其他启用滚动的控件都从 UIScrollView 继承其可滚动性。
Probably there is no way to avoid using scroll view, because this is the main control class that supports scrolling. All other scroll-enabled controls inherit their scrollability from UIScrollView.