2
votes

everybody!

I'm trying to resize imageview (instance of NSImageView) during resizing a window. I set constrain in IB:

  1. leading and trailing constraints between image view and its superview "Equal or greater 0";
  2. height and width constraint for imageview set to "Less then or equal 310";
  3. programmatically set constraints for imageview aspect ratio;

Image size is set explicitly (310x310) - content of imageView;

The problem is that when I resize my window, its width is limited to the minimum 310, although height and width constraint for imageview set to "Less then or equal 310"

So, what i want to do

enter image description here

Any ideas? Thanks!

1

1 Answers

-1
votes

Check your priority settings. If the priority is set to low, it will not do what you want it to do. What are all the constraints priorities in this view?