Returns an object that may be used as the contents of a layer.
- macOS 10.7+
The scale factor for the resulting image. Obtain the value for this parameter by calling the
Layer Contents Scale:
A object that you can assign to the
contents property of a
CALayer object. This object contains the image data from the current image optimized for the specified scale factor.
Use this method in situations where you want to use the image as the contents of a layer. This method provides the image data wrapped in an object that correctly respects all of the possible content gravities supported by the layer. Use of the returned object as the layer’s contents is recommended over the use of the
NSImage object itself.