Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的应用程序中创建一个简单的手指绘画功能。问题是我对 UIView 子类视图实例所做的任何绘图在每次 drawRect 调用后都会被删除......你如何在你的 UIViews 中保留你的上下文绘图?
您必须将图纸添加到模型中,并确保在视图失效时适当地渲染模型。您不想在没有模型的情况下直接在视图上绘图,以便在必要时重新渲染它。
雅各布