I have a subclass of NSView, and the following is set in the initWithFrame am method:
self.wantsLayer = YES;
self.layer.contents = [NSImage imageNamed:@"sprite-sheet"];
self.layer.contentsGravity = kCAGravityLeft;
and when I run it, I get the expected visual results ... and crash with the following log:
** Misuse of NSImage and CALayer. contentsGravity remains. It must be one of the resize, resizeAspect, or resizeAspectFill parameters.
Why? There is no indication in the documents that other values should not be used.
source
share