- (BOOL) contentsAreFlipped needs to be true for .nib layouts

I have an odd bug, if I use initWithFrame as the init routine for NSView subclass that uses layers I don't see this bug.

But if I embedded this view into a storyboard with a .nib file and use initWithCoder, I need to return true on

  • (BOOL) contentsAreFlipped

From the NSView subclass

If I don't the CALayer actually renders from 0,0 from the view upwards and off the window.

The frame sizes for the NSView and the CALayer are good.. when I see them in updateLayer.

Obviously I have a fix.. but I would like to understand why.

- (BOOL) contentsAreFlipped needs to be true for .nib layouts
 
 
Q