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


The following line of code displays an image on my app window, in which an NSImageView control output is called Image View. I used the interface builder so that it could put the NSIages view control on the window, initially (then it was bound in the output image view). How can I change the size of NSIMAView Control inside my program, so that it can match the size of the actual image that is showing (which can be changed from time to time)? What will happen if I want to change the anchor point for the image (i.e., centered, left edge, bottom right, or whatever? Thanks in advance!

Like any other NSView, use it:

  [outputImageViewSetFram: NSMKRact (X, Y, W, H)]  

The coordinates are specified in the system of the specified view.

Val size (leaving the original alone), you can use it:

  [outputImageView setFrameSize: NSMakeSize (w, h)]  

for alignment , Use NSImageView, as jshier has written.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -