UIIimageView *imageView = [UIImageView alloc]init];
[imageView setContentScaleFactor:[[UIScreen mainScreen] scale]];
imageView.contentMode = UIViewContentModeScaleAspectFill;
imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
imageView.clipsToBounds = YES;
设置图片的显示格式不会出现拉伸或者变形的情况
时间: 2024-11-05 00:45:46