A UIImage
view set to "Aspect Fit" will automatically dynamically scale it's image to fit within the current bounds of the UIUmageView
, while maintaining the image's proportions. A UIView
set to "Aspect Fit" does not seem to have this same effect on it's sub-views.
I have tried to set the parent view via code, with the code below, and tried several variations on the auto-resizing mask ( I am not using auto layout). Am I missing something obvious, or do I need to write a little code to compute the right scale for my sub-view based on the current size of the parent view?
[self.view setContentMode:UIViewContentModeScaleAspectFit];