Retired Document
Important: All information in this document is available in NSImageView Class Reference.
Setting an Image View’s Appearance
To set the image, use setImage:.
To set the frame style, use setImageFrameStyle: with one of these arguments:
NSImageFrameNoneshows an invisible frameNSImageFramePhotoshows a thin black outline and a dropped shadowNSImageFrameGrayBezelshows a gray, concave bezel that makes the image look sunkenNSImageFrameGrooveshows a thin groove that looks etched around the imageNSImageFrameButtonshows a convex bezel that makes the image stand out in relief, like a button
To choose how the image is scaled within its frame, use setImageScaling: with one of these arguments:
NSScaleProportionally. If the image is too large, it shrinks to fit inside the frame. If the image is too small, it expands. The proportions of the image are preserved.NSScaleToFit. The image shrinks or expands, and its proportions distort, until it exactly fits the frame.NSScaleNone. The size and proportions of the image don’t change. If the frame is too small to display the whole image, the edges of the image are trimmed off.
To choose how the image is aligned within its frame, use setImageAlignment: with one of these arguments:
NSImageAlignLeftNSImageAlignRightNSImageAlignCenterNSImageAlignTopNSImageAlignBottomNSImageAlignTopLeftNSImageAlignTopRightNSImageAlignBottomLeftNSImageAlignBottomRight
Copyright © 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-03-10