Returns a Boolean value indicating whether the specified rectangle intersects any part of the area that the view is being asked to draw.
SDK
- macOS 10.3+
Framework
- App
Kit
Declaration
- (BOOL)needsToDrawRect:(NSRect)rect;
Parameters
aRect
A rectangle defining a region of the view.
Discussion
You typically send this message from within a draw
implementation. It gives you a convenient way to determine whether any part of a given graphical entity might need to be drawn. It is optimized to efficiently reject any rectangle that lies outside the bounding box of the area that the view is being asked to draw in draw
.