Assume I have one big UIImageView that is set to a vector, and I want this ImageView to take up 90% of the screens width while maintaining it's aspect ratio, regardless of device, since it is a vector, resizing is not an issue. Height does not matter since I need it to just maintain it's aspect ratio, so long as it is 90% of the width of the screen. How can I do this in UIBuilder?
Here is how to make an image width 90% of its superview:
UIImageViewto the Storyboard.
multiplierfor the constraint to
UIImageViewto itself and select Aspect Ratio from the pop-up. Set the
multipliervalue of the resulting constraint to the desired value. You can use a ratio such as
3:4or a floating point value such as
UIImageViewto Scale To Fill, Aspect Fit, or Aspect Fill so that the