Commit a6599e035b83179d7cccc4bec533577646a64004
1 parent
5b16b72c
no message
Showing
1 changed file
with
3 additions
and
1 deletions
CNLiveQrCodeModule/Classes/View/CNLiveMyQrCodeView.m
| ... | ... | @@ -125,6 +125,7 @@ static const CGFloat timeValue = 1.5; |
| 125 | 125 | NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; |
| 126 | 126 | |
| 127 | 127 | UIImage *xw_image = [self getImageWithImageName:@"qr_code_icon" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveMyQrCodeView class]]; |
| 128 | + | |
| 128 | 129 | UIImage *image = [SGQRCodeObtain generateQRCodeWithData:jsonStr size:SCREEN_WIDTH-12*margin logoImage:xw_image ratio:0.2]; |
| 129 | 130 | [strongSelf.qrCode sd_setImageWithURL:nil placeholderImage:image]; |
| 130 | 131 | [[SDImageCache sharedImageCache] storeImage:image forKey:CNUserShareModel.uid toDisk:YES completion:NULL]; |
| ... | ... | @@ -193,7 +194,8 @@ static const CGFloat timeValue = 1.5; |
| 193 | 194 | - (UIImageView *)qrCode { |
| 194 | 195 | if (!_qrCode) { |
| 195 | 196 | _qrCode = [[UIImageView alloc] init]; |
| 196 | - [_qrCode sd_setImageWithURL:nil placeholderImage:[[SDImageCache sharedImageCache] imageFromDiskCacheForKey:CNUserShareModel.uid]]; | |
| 197 | + UIImage *image = [[SDImageCache sharedImageCache] imageFromDiskCacheForKey:CNUserShareModel.uid]; | |
| 198 | + [_qrCode sd_setImageWithURL:nil placeholderImage:image]; | |
| 197 | 199 | } |
| 198 | 200 | return _qrCode; |
| 199 | 201 | } | ... | ... |