Quartz 2D:在视图上绘制而不对其进行子类化?
我可以获取视图的上下文而不对其进行子类化吗?
这可能吗?
Can I get the context of a view with out subclassing it?
Is that possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我可以获取视图的上下文而不对其进行子类化吗?
这可能吗?
Can I get the context of a view with out subclassing it?
Is that possible?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
没有处理绘图的 UIView 委托,所以不,据我所知你不能。当然不是比仅仅子类化 UIView 更容易的方式。
there isn't a UIView delegate that handles drawing, so no, to my knowledge you can't. certainly not in a way that is easier than just subclassing UIView.