How to change the size of NSImageView control from within program?

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2010-06-15T18:36:33Z Indexed on 2010/06/15 19:12 UTC
Read the original article Hit count: 190

Filed under:
|

The following line of code displays an image on my application window, within an NSImageView control named outputImageView. I used Interface Builder to put the NSImageView control onto the window, initially (then bound it to outputImageView). How do I change the size of the NSImageView control within my program, so that it matches the size of the actual image I am displaying (which may change, periodically)? And what if I wanted to change the anchor point for the image (i.e., centered, left edge, bottom right, or whatever? Thanks in advance!

[outputImageView setImage: outputImage]; 

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa