UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"图片"]];
/*
UIViewContentModeScaleToFill,
UIViewContentModeScaleAspectFit, // contents scaled to fit with fixed aspect. remainder is transparent
UIViewContentModeScaleAspectFill,
*/
imgView.contentMode = UIViewContentModeScaleAspectFit;
- UIViewContentModeScaleTo
Fill
:填充 - UIViewContentModeScaleAspect
Fit
:适应 - Scale:比例
Aspect:方向