0
votes

I have a window mostly filled with an image view. When I resize the window from the top right, the image stays where it is, and the window covers and uncovers the image as I move the mouse around. However, when I resize from the bottom left, instead of the window covering up that corner, the image moves with the window's corner.

How do I get the image to remain where it is, no matter which side I'm resizing the window from?

p.s. this is using Cocoa

1
Do you want the image view to resize with the window or not? - rdelmar
I want the image to not resize, since I have separate functions for zooming, I simply want the window to resize independent to the image. - Mirror318

1 Answers

0
votes

You need to change Autosizing property of NSImageView. It can be done by selecting imageView and going to Size Inspector and then changing Autosizing.

Or all this can be done programatically like this:

// Example shows how to turn all autosizing params to imageView

[imageViewOutlet setAutoresizingMask: NSViewMinXMargin | NSViewWidthSizable | NSViewMaxXMargin | NSViewMinYMargin | NSViewHeightSizable | NSViewMaxYMargin];