UIImageView三種方式

weixin_34007291發表於2015-12-11
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(比例)

相關文章