needsToDraw(_:)
Returns a Boolean value indicating whether the specified rectangle intersects any part of the area that the view is being asked to draw.
Declaration
func needsToDraw(_ rect: NSRect) -> BoolParameters
- rect:
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(_:).