I have an image view that i would like to maintain the aspect ratio of but still be able to resize the window.
Asked
Active
Viewed 1,070 times
3
-
Scalling "Proportionally Up or Down" ? – Pedro Vieira May 08 '12 at 23:57
2 Answers
3
Set the image view scaling property to "proportionally up or down" in interface builder and set the content aspect ratio of the window containing it:
[window setContentAspectRatio:myImageView.image.size];

dbainbridge
- 1,190
- 11
- 18
0
As far as I know, there's no way to do this "automatically", you'll need to follow the frame change of the window (with the delegate method windowWillResize:toSize:) and adjust your image view's frame however you want it to change.

rdelmar
- 103,982
- 12
- 207
- 218