Using UIViewContentModeScaleAspectFit to fill view?
Wh开发者_JAVA技巧at will be best or standard aspect ratio of image to fill view using UIViewContentModeScaleAspectFit, or what'll be best resolution of image to fill view???
As for as I know, you've no need to worry about the aspect ratio of image. If you set the content mode of the view to UIViewContentModeScaleAspectFit, then it
Scales the content to fit the size of the view. This option maintains the aspect ratio of the content. Any remaining area of the view’s bounds is transparent.
If the image size is 60x40, and your views size is 200x200, the image will be displayed in the size 180x120, centered on its superview. And your image may loose some details if its superview is too large to fit.
精彩评论