iOS Developer

UI控件相关

2015-12-11  本文已影响183人  你瞅誰
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"图片"]];
    /*
     UIViewContentModeScaleToFill,
     UIViewContentModeScaleAspectFit,      
// contents scaled to fit with fixed aspect. remainder is transparent
     UIViewContentModeScaleAspectFill,
     */
    imgView.contentMode = UIViewContentModeScaleAspectFit;

  • Scale To Fill 按照大小进行填充(会改变形状、比例)----看不到背景
上一篇 下一篇

猜你喜欢

热点阅读