//只需如下设置imageView
[picImg setContentScaleFactor:[[UIScreenmainScreen] scale]];
picImg.contentMode = UIViewContentModeScaleAspectFill;
picImg.autoresizingMask = UIViewAutoresizingFlexibleWidth;//根据你的需求
picImg.clipsToBounds = YES;//切掉多余部分
2023-09-28 10:39:28
//只需如下设置imageView
[picImg setContentScaleFactor:[[UIScreenmainScreen] scale]];
picImg.contentMode = UIViewContentModeScaleAspectFill;
picImg.autoresizingMask = UIViewAutoresizingFlexibleWidth;//根据你的需求
picImg.clipsToBounds = YES;//切掉多余部分