|
|
@@ -2196,6 +2196,7 @@
|
|
|
NSString* img_url = [section valueForKey:@"data"];
|
|
|
|
|
|
cell.sign_img.userInteractionEnabled = NO;
|
|
|
+
|
|
|
__block BOOL hasTapGesture = NO;
|
|
|
[cell.sign_img.gestureRecognizers enumerateObjectsUsingBlock:^(__kindof UIGestureRecognizer * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
|
|
@@ -2454,9 +2455,17 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // Button 设置了大小约束,Size就不会随内容变化
|
|
|
+ [cell.imgbtn setContentMode:UIViewContentModeScaleAspectFit];
|
|
|
+ [cell.imgbtn setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
|
|
|
+ [cell.imgbtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentFill];
|
|
|
+ [cell.imgbtn setContentVerticalAlignment:UIControlContentVerticalAlignmentFill];
|
|
|
+ cell.imgbtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
|
+
|
|
|
if (![cell.imageName isEqualToString:img_url]) {
|
|
|
cell.imageName = img_url;
|
|
|
- [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
|
|
|
NSString* file_name=[img_url lastPathComponent];
|
|
|
NSData* img_data=[iSalesDB load_cached_img:file_name loadFrom:img_url];
|
|
|
@@ -2464,7 +2473,8 @@
|
|
|
{
|
|
|
|
|
|
UIImage * img =[UIImage imageWithData:img_data];
|
|
|
- [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:img forState:UIControlStateNormal];
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -2483,10 +2493,12 @@
|
|
|
[iSalesDB cache_img:downloadimg_data filename:file_name saveTo:img_url];
|
|
|
|
|
|
UIImage * img =[UIImage imageWithData:downloadimg_data];
|
|
|
- [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:img forState:UIControlStateNormal];
|
|
|
}
|
|
|
else
|
|
|
- [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
|
|
|
|
|
|
});
|
|
|
@@ -2829,9 +2841,17 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // Button 设置了大小约束,Size就不会随内容变化
|
|
|
+ [cell.imgbtn setContentMode:UIViewContentModeScaleAspectFit];
|
|
|
+ [cell.imgbtn setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
|
|
|
+ [cell.imgbtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentFill];
|
|
|
+ [cell.imgbtn setContentVerticalAlignment:UIControlContentVerticalAlignmentFill];
|
|
|
+ cell.imgbtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
|
+
|
|
|
if (![cell.imageName isEqualToString:img_url]) {
|
|
|
cell.imageName = img_url;
|
|
|
- [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
|
|
|
NSString* file_name=[img_url lastPathComponent];
|
|
|
NSData* img_data=[iSalesDB load_cached_img:file_name loadFrom:img_url];
|
|
|
@@ -2839,7 +2859,8 @@
|
|
|
{
|
|
|
|
|
|
UIImage * img =[UIImage imageWithData:img_data];
|
|
|
- [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:img forState:UIControlStateNormal];
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -2858,10 +2879,12 @@
|
|
|
[iSalesDB cache_img:downloadimg_data filename:file_name saveTo:img_url];
|
|
|
|
|
|
UIImage * img =[UIImage imageWithData:downloadimg_data];
|
|
|
- [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:img forState:UIControlStateNormal];
|
|
|
}
|
|
|
else
|
|
|
- [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
|
|
|
|
|
|
});
|
|
|
@@ -3204,9 +3227,17 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // Button 设置了大小约束,Size就不会随内容变化
|
|
|
+ [cell.imgbtn setContentMode:UIViewContentModeScaleAspectFit];
|
|
|
+ [cell.imgbtn setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
|
|
|
+ [cell.imgbtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentFill];
|
|
|
+ [cell.imgbtn setContentVerticalAlignment:UIControlContentVerticalAlignmentFill];
|
|
|
+ cell.imgbtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
|
+
|
|
|
if (![cell.imageName isEqualToString:img_url]) {
|
|
|
cell.imageName = img_url;
|
|
|
- [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
|
|
|
NSString* file_name=[img_url lastPathComponent];
|
|
|
NSData* img_data=[iSalesDB load_cached_img:file_name loadFrom:img_url];
|
|
|
@@ -3214,7 +3245,8 @@
|
|
|
{
|
|
|
|
|
|
UIImage * img =[UIImage imageWithData:img_data];
|
|
|
- [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:img forState:UIControlStateNormal];
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -3233,10 +3265,12 @@
|
|
|
[iSalesDB cache_img:downloadimg_data filename:file_name saveTo:img_url];
|
|
|
|
|
|
UIImage * img =[UIImage imageWithData:downloadimg_data];
|
|
|
- [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:img forState:UIControlStateNormal];
|
|
|
}
|
|
|
else
|
|
|
- [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
|
|
|
|
|
|
});
|
|
|
@@ -3606,9 +3640,17 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // Button 设置了大小约束,Size就不会随内容变化
|
|
|
+ [cell.imgbtn setContentMode:UIViewContentModeScaleAspectFit];
|
|
|
+ [cell.imgbtn setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
|
|
|
+ [cell.imgbtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentFill];
|
|
|
+ [cell.imgbtn setContentVerticalAlignment:UIControlContentVerticalAlignmentFill];
|
|
|
+ cell.imgbtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
|
+
|
|
|
if (![cell.imageName isEqualToString:img_url]) {
|
|
|
cell.imageName = img_url;
|
|
|
- [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:[UIImage imageNamed:@"loading_s"] forState:UIControlStateNormal];
|
|
|
|
|
|
NSString* file_name=[img_url lastPathComponent];
|
|
|
NSData* img_data=[iSalesDB load_cached_img:file_name loadFrom:img_url];
|
|
|
@@ -3616,7 +3658,8 @@
|
|
|
{
|
|
|
|
|
|
UIImage * img =[UIImage imageWithData:img_data];
|
|
|
- [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:img forState:UIControlStateNormal];
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -3635,10 +3678,12 @@
|
|
|
[iSalesDB cache_img:downloadimg_data filename:file_name saveTo:img_url];
|
|
|
|
|
|
UIImage * img =[UIImage imageWithData:downloadimg_data];
|
|
|
- [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:img forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:img forState:UIControlStateNormal];
|
|
|
}
|
|
|
else
|
|
|
- [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
+// [cell.imgbtn setBackgroundImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
+ [cell.imgbtn setImage:[UIImage imageNamed:@"notfound_s"] forState:UIControlStateNormal];
|
|
|
|
|
|
|
|
|
});
|