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.
除了在其上绘制另一个矩形之外,如何删除绘制的 NSRect 或其他对象?
假设您绘制了矩形drawRect:,您需要做的就是从要绘制的对象列表中排除矩形并调用[view setNeedsDisplayInRect:theRect]. theRect这将是CGRect等价的。
drawRect:
[view setNeedsDisplayInRect:theRect]
theRect
CGRect