O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSImageView — Mac OS X 10.0

Synopsis

This subclass of NSView is responsible for drawing an image in a frame, and provides functionality that allows users to set the displayed image by dropping an image over the view. Clients may access the NSImage displayed in the image view using the methods setImage: and image. The associated cell for this class is NSImageCell.

image with no caption

@interface NSImageView : NSControl
                                  // Accessor Methods
   - (void)setImage:(NSImage *)newImage;
   - (NSImage *)image;
   - (void)setImageAlignment:(NSImageAlignment)newAlign;
   - (NSImageAlignment)imageAlignment;
   - (void)setImageFrameStyle:(NSImageFrameStyle)newStyle;
   - (NSImageFrameStyle)imageFrameStyle;
   - (void)setImageScaling:(NSImageScaling)newScaling;
   - (NSImageScaling)imageScaling;
   - (void)setEditable:(BOOL)yn;
                                  // Instance Methods
   - (BOOL)isEditable;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required