设置ios中imageView图片自适应,

UIIimageView  *imageView = [UIImageView alloc]init];

[imageView setContentScaleFactor:[[UIScreen mainScreen] scale]];
 imageView.contentMode =  UIViewContentModeScaleAspectFill;
 imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
 imageView.clipsToBounds  = YES;

设置图片的显示格式不会出现拉伸或者变形的情况

上一篇:Highcharts入坑记


下一篇:nodejs模块引用