A Boolean value indicating whether AppKit’s default clipping behavior is in effect.
SDK
- macOS 10.3+
Framework
- App
Kit
Declaration
var wantsDefaultClipping: Bool { get }
Return Value
true
if the default clipping is in effect, false
otherwise. By default, this method returns true
.
Discussion
The default value of this property is true
. When the value of this property is true
, AppKit sets the current clipping region to the bounds of the view prior to calling that view’s draw(_:)
method. Subclasses may override this property and return false
to suppress this default clipping behavior. You might do this to avoid the cost of setting up, enforcing, and cleaning up the clipping path. If you do change the value to false
, you are responsible for doing your own clipping or constraining drawing appropriately. Failure to do so could the view to corrupt the contents of other views in the window.