公屏卡顿问题
This commit is contained in:
@@ -1202,18 +1202,19 @@
|
||||
CGFloat scale = image.size.width / image.size.height;
|
||||
imageView.bounds = CGRectMake(0, 0, 18 * scale, 18);
|
||||
} else {
|
||||
NSURL *imgUrl = [NSURL URLWithString:imageName];
|
||||
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
|
||||
if (myImage) {
|
||||
CGFloat scale = myImage.size.width / myImage.size.height;
|
||||
if (scale == 0) {
|
||||
imageView.bounds = CGRectMake(0, 0, 60, 18);
|
||||
}else {
|
||||
imageView.bounds = CGRectMake(0, 0, 18* scale, 18);
|
||||
}
|
||||
} else {
|
||||
// NSURL *imgUrl = [NSURL URLWithString:imageName];
|
||||
//
|
||||
// UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
|
||||
// if (myImage) {
|
||||
// CGFloat scale = myImage.size.width / myImage.size.height;
|
||||
// if (scale == 0) {
|
||||
// imageView.bounds = CGRectMake(0, 0, 60, 18);
|
||||
// }else {
|
||||
// imageView.bounds = CGRectMake(0, 0, 18* scale, 18);
|
||||
// }
|
||||
// } else {
|
||||
imageView.bounds = CGRectMake(0, 0, 60, 18);
|
||||
}
|
||||
// }
|
||||
}
|
||||
imageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// 铭牌文字
|
||||
|
Reference in New Issue
Block a user