简体   繁体   English

在CALayer上绘制可滚动文本

[英]Drawing scrollable text on a CALayer

I have the graphics context of a CALayer, and I would like to draw text inside of a "scrollview". 我有一个CALayer的图形上下文,我想在“ 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? 由于其他原因,我无法使用UIScrollView ...无论如何,有没有将可滚动文本绘制到calayer上?

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. 所有其他启用滚动的控件都从UIScrollView继承其滚动性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM