I have an image which I am using in my app. I am using UIViewContentModeScaleAspectFit to ensure it caters for different screen sizes by preserving aspect ratios. However, in small screen phones, this is inducing whitespaces at top and bottom and in latest bigger devices, its coming perfectly fine.
Below is the small snippet in Objective-C.
imgMain.contentMode = UIViewContentModeScaleAspectFit;
Can anyone please help how to get rid of these white spaces and ensure the image sits on top and having no transparent space at the bottom and oblige