objective-ccocoacalayernsviewclip

Make NSView NOT clip subviews outside of its bounds


Is it possible to make an NSView not clip its subviews that are outside of the bounds? On iOS I would simply set clipsToBounds of my UIView no NO. But NSView doesn't have such a property. I tried experimenting with wantsLayer, masksToBounds, wantsDefaultClipping, but all of these seem to only change the clipping of the drawRect method, not the subviews.


Solution

  • I was able to solve this by overriding wantsDefaultClipping of the subviews to return NO.