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:
NSImageFrameNone
shows an invisible frameNSImageFramePhoto
shows a thin black outline and a dropped shadowNSImageFrameGrayBezel
shows a gray, concave bezel that makes the image look sunkenNSImageFrameGroove
shows a thin groove that looks etched around the imageNSImageFrameButton
shows 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:
NSImageAlignLeft
NSImageAlignRight
NSImageAlignCenter
NSImageAlignTop
NSImageAlignBottom
NSImageAlignTopLeft
NSImageAlignTopRight
NSImageAlignBottomLeft
NSImageAlignBottomRight
Copyright © 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-03-10