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.
我有一个NSBezierPath我创建的,我称之为 -stroke 。如何在不释放对象的情况下从视图中删除/删除它?
NSBezierPath
一条-stroke消息告诉NSBezierPath在当前绘图上下文中呈现自己。如果您在视图中绘制了一条路径,并且您希望描边路径消失,只需重新绘制没有路径的视图。
-stroke
如果要暂时禁用绘图,可以[NSColor clearColor]在调用前设置stroke。
[NSColor clearColor]
stroke