CGRect imageLocation = CGRectMake(startingXCoordinate, startingYCoordinate + detailedTitleLabel.frame.size.height + marginY, 280, 300);
self.detailedImageView.frame = imageLocation;
This is the code I've got so far. You can see the width is 280 and the height is 300 for now... In the interface builder, I also set this image view as 'Aspect Fit' to keep the ratio.
The problem here is... for some bigger or smaller images, they're located in the centre of the UIImageView and it naturally creates some extra top & bottom margins. How can I make a perfectly fitting UIImageView not ruining the ratio with 280 width?
Thank you in advance