UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"圖片"]];
/*
UIViewContentModeScaleToFill,
UIViewContentModeScaleAspectFit, // contents scaled to fit with fixed aspect. remainder is transparent
UIViewContentModeScaleAspectFill,
*/
imgView.contentMode = UIViewContentModeScaleAspectFit;
Fill(填充) Fit(試用)Aspect(方向)scale(比例)
- 如果子類view比父類的view大 那么它的坐標(biāo)為負(fù)的, bounds為本身