init(snapshotImage:presentationFrame:)
Creates a text preview using the specified image.
Declaration
convenience init(snapshotImage: CGImage, presentationFrame: NSRect)Parameters
- snapshotImage:
An image that contains the requested text from your view. Create the image using a transparent background and the current rendering attributes for your text.
- presentationFrame:
A rectangle in your frame’s coordinate space. The system uses this rectangle to place your image precisely over your view’s actual text. Set its size to the size of your snapshot image, and set its origin to the point that allows the system to place your image directly over the text.