Commit c184edab6f3f320df6f2169fbf72865332bce55f
1 parent
dd5a2268
no message
Showing
9 changed files
with
14 additions
and
14 deletions
CNLiveQrCodeModule/Classes/Controller/CNLiveGenerateQrCodeController.m
| ... | ... | @@ -235,7 +235,7 @@ static const CGFloat timeValue = 1.5; |
| 235 | 235 | _navigationBar = [[CNLiveQrCodeNavigationBar alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavigationContentTop)]; |
| 236 | 236 | _navigationBar.delegate = self; |
| 237 | 237 | _navigationBar.title.text = @"生成二维码"; |
| 238 | - UIImage *image2 = [UIImage cn_getImageName:@"mine_code_more" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 238 | + UIImage *image2 = [self getImageWithImageName:@"mine_code_more" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 239 | 239 | [_navigationBar.right setImage:[image2 imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal]; |
| 240 | 240 | } |
| 241 | 241 | return _navigationBar; | ... | ... |
CNLiveQrCodeModule/Classes/Controller/CNLiveGroupQrCodeController.m
| ... | ... | @@ -87,7 +87,7 @@ static const CGFloat timeValue = 1.5; |
| 87 | 87 | _navigationBar = [[CNLiveQrCodeNavigationBar alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavigationContentTop)]; |
| 88 | 88 | _navigationBar.backgroundColor = [UIColor whiteColor]; |
| 89 | 89 | _navigationBar.delegate = self; |
| 90 | - UIImage *image = [UIImage cn_getImageName:@"code_back_black_b" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveGroupQrCodeController class]]; | |
| 90 | + UIImage *image = [self getImageWithImageName:@"code_back_black_b" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveGroupQrCodeController class]]; | |
| 91 | 91 | [_navigationBar.left setImage:[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal]; |
| 92 | 92 | _navigationBar.title.text = @"群二维码名片"; |
| 93 | 93 | _navigationBar.title.textColor = [UIColor blackColor]; | ... | ... |
CNLiveQrCodeModule/Classes/Controller/CNLiveMyQrCodeController.m
| ... | ... | @@ -229,7 +229,7 @@ static const CGFloat timeValue = 1.5; |
| 229 | 229 | - (UIImageView *)bgView{ |
| 230 | 230 | if(!_bgView){ |
| 231 | 231 | _bgView = [[UIImageView alloc]initWithFrame:self.view.bounds]; |
| 232 | - UIImage *image = [UIImage cn_getImageName:@"qr_code_bg" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveMyQrCodeController class]]; | |
| 232 | + UIImage *image = [self getImageWithImageName:@"qr_code_bg" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveMyQrCodeController class]]; | |
| 233 | 233 | [_bgView sd_setImageWithURL:[NSURL URLWithString:@"User_Head"] placeholderImage:image completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| 234 | 234 | }]; |
| 235 | 235 | } |
| ... | ... | @@ -248,7 +248,7 @@ static const CGFloat timeValue = 1.5; |
| 248 | 248 | _navigationBar = [[CNLiveQrCodeNavigationBar alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavigationContentTop)]; |
| 249 | 249 | _navigationBar.delegate = self; |
| 250 | 250 | _navigationBar.title.text = @"我的二维码"; |
| 251 | - UIImage *image2 = [UIImage cn_getImageName:@"mine_code_more" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveMyQrCodeController class]]; | |
| 251 | + UIImage *image2 = [self getImageWithImageName:@"mine_code_more" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveMyQrCodeController class]]; | |
| 252 | 252 | [_navigationBar.right setImage:[image2 imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal]; |
| 253 | 253 | } |
| 254 | 254 | return _navigationBar; | ... | ... |
CNLiveQrCodeModule/Classes/Controller/CNLiveScanQrCodeController.m
| ... | ... | @@ -300,8 +300,8 @@ static const CGFloat timeValue = 1.5; |
| 300 | 300 | CGFloat flashlightBtnX = 0.5 * (self.view.frame.size.width - flashlightBtnW); |
| 301 | 301 | CGFloat flashlightBtnY = 0.55 * self.view.frame.size.height; |
| 302 | 302 | _flashlightBtn.frame = CGRectMake(flashlightBtnX, flashlightBtnY, flashlightBtnW, flashlightBtnH); |
| 303 | - UIImage *image1 = [UIImage cn_getImageName:@"flashlight_close" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveScanQrCodeController class]]; | |
| 304 | - UIImage *image2 = [UIImage cn_getImageName:@"flashlight_open" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveScanQrCodeController class]]; | |
| 303 | + UIImage *image1 = [self getImageWithImageName:@"flashlight_close" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveScanQrCodeController class]]; | |
| 304 | + UIImage *image2 = [self getImageWithImageName:@"flashlight_open" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveScanQrCodeController class]]; | |
| 305 | 305 | [_flashlightBtn setImage:image1 forState:UIControlStateNormal]; |
| 306 | 306 | [_flashlightBtn setImage:image2 forState:UIControlStateSelected]; |
| 307 | 307 | [_flashlightBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; |
| ... | ... | @@ -343,7 +343,7 @@ static const CGFloat timeValue = 1.5; |
| 343 | 343 | CGFloat flashlightBtnX = 0.5 * (self.view.frame.size.width - flashlightBtnW); |
| 344 | 344 | CGFloat flashlightBtnY = CGRectGetMaxY(self.promptLabel.frame)+15; |
| 345 | 345 | _codeButton.frame = CGRectMake(flashlightBtnX, flashlightBtnY, flashlightBtnW, flashlightBtnH); |
| 346 | - UIImage *image = [UIImage cn_getImageName:@"qr_code_green" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveScanQrCodeController class]]; | |
| 346 | + UIImage *image = [self getImageWithImageName:@"qr_code_green" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveScanQrCodeController class]]; | |
| 347 | 347 | [_codeButton setImage:image forState:UIControlStateNormal]; |
| 348 | 348 | [_codeButton setTitle:@"我的二维码" forState:UIControlStateNormal]; |
| 349 | 349 | _codeButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:15.0f]; | ... | ... |
CNLiveQrCodeModule/Classes/Controller/CNLiveScanResultController.m
| ... | ... | @@ -79,7 +79,7 @@ |
| 79 | 79 | _navigationBar.title.textColor = [UIColor blackColor]; |
| 80 | 80 | _navigationBar.delegate = self; |
| 81 | 81 | |
| 82 | - UIImage *image = [UIImage cn_getImageName:@"code_back_black_b" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveScanResultController class]]; | |
| 82 | + UIImage *image = [self getImageWithImageName:@"code_back_black_b" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveScanResultController class]]; | |
| 83 | 83 | [_navigationBar.left setImage:[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal]; |
| 84 | 84 | _navigationBar.right = nil; |
| 85 | 85 | ... | ... |
CNLiveQrCodeModule/Classes/View/CNLiveGenerateCodeView.m
| ... | ... | @@ -98,7 +98,7 @@ static const NSInteger margin = 20; |
| 98 | 98 | |
| 99 | 99 | NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; |
| 100 | 100 | |
| 101 | - UIImage *xw_image = [UIImage cn_getImageName:@"qr_code_icon" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 101 | + UIImage *xw_image = [self getImageWithImageName:@"qr_code_icon" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 102 | 102 | [self.qrCode sd_setImageWithURL:nil placeholderImage:[SGQRCodeObtain generateQRCodeWithData:jsonStr size:SCREEN_WIDTH-12*margin logoImage:xw_image ratio:0.2]]; |
| 103 | 103 | |
| 104 | 104 | } |
| ... | ... | @@ -124,7 +124,7 @@ static const NSInteger margin = 20; |
| 124 | 124 | _header = [[UIImageView alloc] init]; |
| 125 | 125 | _header.layer.masksToBounds = YES; |
| 126 | 126 | _header.layer.cornerRadius = 5; |
| 127 | - UIImage *xw_image = [UIImage cn_getImageName:@"default_avatar_f" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 127 | + UIImage *xw_image = [self getImageWithImageName:@"default_avatar_f" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 128 | 128 | [_header sd_setImageWithURL:[NSURL URLWithString:CNUserShareModel.faceUrl] placeholderImage:xw_image]; |
| 129 | 129 | } |
| 130 | 130 | return _header; | ... | ... |
CNLiveQrCodeModule/Classes/View/CNLiveGroupQrCodeView.m
| ... | ... | @@ -106,7 +106,7 @@ static const NSInteger margin = 15; |
| 106 | 106 | if (!_groupHead) { |
| 107 | 107 | _groupHead = [[UIImageView alloc] init]; |
| 108 | 108 | _groupHead.backgroundColor = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; |
| 109 | - UIImage *xw_image = [UIImage cn_getImageName:@"default_avatar_f" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 109 | + UIImage *xw_image = [self getImageWithImageName:@"default_avatar_f" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 110 | 110 | [_groupHead sd_setImageWithURL:[NSURL URLWithString:CNUserShareModel.faceUrl] placeholderImage:xw_image]; |
| 111 | 111 | |
| 112 | 112 | } | ... | ... |
CNLiveQrCodeModule/Classes/View/CNLiveMyQrCodeView.m
| ... | ... | @@ -124,7 +124,7 @@ static const CGFloat timeValue = 1.5; |
| 124 | 124 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonDic options:NSJSONWritingPrettyPrinted error:nil]; |
| 125 | 125 | NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; |
| 126 | 126 | |
| 127 | - UIImage *xw_image = [UIImage cn_getImageName:@"qr_code_icon" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveMyQrCodeView class]]; | |
| 127 | + UIImage *xw_image = [self getImageWithImageName:@"qr_code_icon" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveMyQrCodeView class]]; | |
| 128 | 128 | [strongSelf.qrCode sd_setImageWithURL:nil placeholderImage:[SGQRCodeObtain generateQRCodeWithData:jsonStr size:SCREEN_WIDTH-12*margin logoImage:xw_image ratio:0.2]]; |
| 129 | 129 | |
| 130 | 130 | if([type isEqualToString:@"reset"]){ |
| ... | ... | @@ -162,7 +162,7 @@ static const CGFloat timeValue = 1.5; |
| 162 | 162 | _header = [[UIImageView alloc] init]; |
| 163 | 163 | _header.layer.masksToBounds = YES; |
| 164 | 164 | _header.layer.cornerRadius = 5; |
| 165 | - UIImage *xw_image = [UIImage cn_getImageName:@"default_avatar_f" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 165 | + UIImage *xw_image = [self getImageWithImageName:@"default_avatar_f" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 166 | 166 | [_header sd_setImageWithURL:[NSURL URLWithString:CNUserShareModel.faceUrl] placeholderImage:xw_image]; |
| 167 | 167 | } |
| 168 | 168 | return _header; | ... | ... |
CNLiveQrCodeModule/Classes/View/CNLiveQrCodeNavigationBar.m
| ... | ... | @@ -60,7 +60,7 @@ static const NSInteger margin = 15; |
| 60 | 60 | _left= [UIButton buttonWithType:UIButtonTypeCustom]; |
| 61 | 61 | _left.adjustsImageWhenHighlighted = NO; |
| 62 | 62 | _left.frame = CGRectMake(margin, StatusBarHeight, NavigationBarHeight, NavigationBarHeight); |
| 63 | - UIImage *image = [UIImage cn_getImageName:@"mine_back_white_b" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveQrCodeNavigationBar class]]; | |
| 63 | + UIImage *image = [self getImageWithImageName:@"mine_back_white_b" bundleName:@"CNLiveQrCodeModule" targetClass:[CNLiveQrCodeNavigationBar class]]; | |
| 64 | 64 | [_left setImage:[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal]; |
| 65 | 65 | [_left setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft]; |
| 66 | 66 | [_left addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside]; | ... | ... |