Commit 68fd5c87206fde625fbaacbe9696db91f7de2935
1 parent
20f88a65
no message
Showing
6 changed files
with
53 additions
and
17 deletions
CNLiveQrCodeModule.podspec
CNLiveQrCodeModule/Classes/Controller/CNLiveGroupQrCodeController.m
| ... | ... | @@ -101,7 +101,7 @@ static const CGFloat timeValue = 1.5; |
| 101 | 101 | _groupView.center = CGPointMake(self.view.center.x, self.view.center.y-20); |
| 102 | 102 | _groupView.layer.masksToBounds = YES; |
| 103 | 103 | _groupView.layer.cornerRadius = 10; |
| 104 | -// _groupView.group = self.group; | |
| 104 | + _groupView.group = self.group; | |
| 105 | 105 | } |
| 106 | 106 | return _groupView; |
| 107 | 107 | } | ... | ... |
CNLiveQrCodeModule/Classes/View/CNLiveGroupQrCodeView.h
CNLiveQrCodeModule/Classes/View/CNLiveGroupQrCodeView.m
| ... | ... | @@ -15,6 +15,10 @@ |
| 15 | 15 | #import "CNUserInfoManager.h" |
| 16 | 16 | #import "CNLiveCategory.h" |
| 17 | 17 | |
| 18 | +// IM | |
| 19 | +#import "TIMAdapter.h" | |
| 20 | +#import "CommonLibrary.h" | |
| 21 | + | |
| 18 | 22 | @interface CNLiveGroupQrCodeView() |
| 19 | 23 | @property (nonatomic, strong) UIImageView *groupHead; |
| 20 | 24 | @property (nonatomic, strong) UILabel *groupName; |
| ... | ... | @@ -78,16 +82,16 @@ static const NSInteger margin = 15; |
| 78 | 82 | */ |
| 79 | 83 | |
| 80 | 84 | #pragma mark - Setter |
| 81 | -//- (void)setGroup:(IMAGroup *)group{ | |
| 82 | -// _group = group; | |
| 83 | -// if(group.avatorIcon){ | |
| 84 | -// _groupHead.image = group.avatorIcon; | |
| 85 | -// }else{ | |
| 85 | +- (void)setGroup:(IMAGroup *)group{ | |
| 86 | + _group = group; | |
| 87 | + if(group.avatorIcon){ | |
| 88 | + _groupHead.image = group.avatorIcon; | |
| 89 | + }else{ | |
| 86 | 90 | // [_groupHead setImageWithGroupId:group.groupInfo.groupId]; |
| 87 | -// | |
| 88 | -// } | |
| 89 | -// _groupName.text = group.groupInfo.groupName; | |
| 90 | -// | |
| 91 | + | |
| 92 | + } | |
| 93 | + _groupName.text = group.groupInfo.groupName; | |
| 94 | + | |
| 91 | 95 | // [QMUITips showLoadingInView:self]; |
| 92 | 96 | // [[CNGroupActiveViewModel sharedCNGroupActiveViewModel] requestServerForDownloadAppActionUrlSourceCompleterBlock:^(NSString *shareUrl) { |
| 93 | 97 | // [QMUITips hideAllTipsInView:self]; |
| ... | ... | @@ -95,11 +99,11 @@ static const NSInteger margin = 15; |
| 95 | 99 | // NSString *qrCode = [NSString stringWithFormat:@"%@wjjQrSkipType=wjjQrPublicGroupType&isWjjQr=%@",shareUrl,wjjQr]; |
| 96 | 100 | // self.qrcode.image = [SGQRCodeGenerateManager generateWithLogoQRCodeData:qrCode logoImageName:nil logoScaleToSuperView:0.2]; |
| 97 | 101 | // |
| 98 | -// UIImage *xw_image = [self xw_getImageName:@"qr_code_icon" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 102 | +// UIImage *xw_image = [self getImageWithImageName:@"qr_code_icon" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 99 | 103 | // [strongSelf.qrCode sd_setImageWithURL:nil placeholderImage:[SGQRCodeObtain generateQRCodeWithData:jsonStr size:SCREEN_WIDTH-12*margin logoImage:xw_image ratio:0.2]]; |
| 100 | 104 | // |
| 101 | 105 | // }]; |
| 102 | -//} | |
| 106 | +} | |
| 103 | 107 | |
| 104 | 108 | #pragma mark - Getter |
| 105 | 109 | - (UIImageView *)groupHead { | ... | ... |
CNLiveQrCodeModule/Classes/View/CNLiveMyQrCodeView.m
| ... | ... | @@ -191,6 +191,7 @@ static const CGFloat timeValue = 1.5; |
| 191 | 191 | - (UIImageView *)qrCode { |
| 192 | 192 | if (!_qrCode) { |
| 193 | 193 | _qrCode = [[UIImageView alloc] init]; |
| 194 | + _qrCode.image = [[SDImageCache sharedImageCache] imageFromDiskCacheForKey:CNUserShareModel.uid]; | |
| 194 | 195 | } |
| 195 | 196 | return _qrCode; |
| 196 | 197 | } | ... | ... |
Example/CNLiveQrCodeModule.xcodeproj/project.pbxproj
| ... | ... | @@ -207,7 +207,8 @@ |
| 207 | 207 | 6003F586195388D20070C39A /* Sources */, |
| 208 | 208 | 6003F587195388D20070C39A /* Frameworks */, |
| 209 | 209 | 6003F588195388D20070C39A /* Resources */, |
| 210 | - 957BE2AA6C063EC7DECD8FAC /* [CP] Embed Pods Frameworks */, | |
| 210 | + 936400C36A68BB4DAA5C8A6E /* [CP] Embed Pods Frameworks */, | |
| 211 | + 4644CC2D244368A8795F234F /* [CP] Copy Pods Resources */, | |
| 211 | 212 | ); |
| 212 | 213 | buildRules = ( |
| 213 | 214 | ); |
| ... | ... | @@ -320,6 +321,24 @@ |
| 320 | 321 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; |
| 321 | 322 | showEnvVarsInLog = 0; |
| 322 | 323 | }; |
| 324 | + 4644CC2D244368A8795F234F /* [CP] Copy Pods Resources */ = { | |
| 325 | + isa = PBXShellScriptBuildPhase; | |
| 326 | + buildActionMask = 2147483647; | |
| 327 | + files = ( | |
| 328 | + ); | |
| 329 | + inputPaths = ( | |
| 330 | + "${PODS_ROOT}/Target Support Files/Pods-CNLiveQrCodeModule_Example/Pods-CNLiveQrCodeModule_Example-resources.sh", | |
| 331 | + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveQrCodeModule/CNLiveQrCodeModule.bundle", | |
| 332 | + ); | |
| 333 | + name = "[CP] Copy Pods Resources"; | |
| 334 | + outputPaths = ( | |
| 335 | + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveQrCodeModule.bundle", | |
| 336 | + ); | |
| 337 | + runOnlyForDeploymentPostprocessing = 0; | |
| 338 | + shellPath = /bin/sh; | |
| 339 | + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveQrCodeModule_Example/Pods-CNLiveQrCodeModule_Example-resources.sh\"\n"; | |
| 340 | + showEnvVarsInLog = 0; | |
| 341 | + }; | |
| 323 | 342 | 667E6DC32E1A51CD56D1B74A /* [CP] Check Pods Manifest.lock */ = { |
| 324 | 343 | isa = PBXShellScriptBuildPhase; |
| 325 | 344 | buildActionMask = 2147483647; |
| ... | ... | @@ -342,7 +361,7 @@ |
| 342 | 361 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; |
| 343 | 362 | showEnvVarsInLog = 0; |
| 344 | 363 | }; |
| 345 | - 957BE2AA6C063EC7DECD8FAC /* [CP] Embed Pods Frameworks */ = { | |
| 364 | + 936400C36A68BB4DAA5C8A6E /* [CP] Embed Pods Frameworks */ = { | |
| 346 | 365 | isa = PBXShellScriptBuildPhase; |
| 347 | 366 | buildActionMask = 2147483647; |
| 348 | 367 | files = ( |
| ... | ... | @@ -352,38 +371,44 @@ |
| 352 | 371 | "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", |
| 353 | 372 | "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", |
| 354 | 373 | "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework", |
| 374 | + "${BUILT_PRODUCTS_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework", | |
| 355 | 375 | "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework", |
| 376 | + "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", | |
| 356 | 377 | "${BUILT_PRODUCTS_DIR}/CNLiveCommonClass/CNLiveCommonClass.framework", |
| 357 | 378 | "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework", |
| 358 | 379 | "${BUILT_PRODUCTS_DIR}/CNLiveManager/CNLiveManager.framework", |
| 359 | - "${BUILT_PRODUCTS_DIR}/CNLiveQrCodeModule/CNLiveQrCodeModule.framework", | |
| 360 | 380 | "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", |
| 361 | 381 | "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", |
| 362 | 382 | "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework", |
| 383 | + "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", | |
| 363 | 384 | "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", |
| 364 | 385 | "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", |
| 365 | 386 | "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", |
| 366 | 387 | "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", |
| 367 | 388 | "${BUILT_PRODUCTS_DIR}/SGQRCode/SGQRCode.framework", |
| 389 | + "${PODS_ROOT}/TXIMSDK_iOS/ImSDK.framework", | |
| 368 | 390 | ); |
| 369 | 391 | name = "[CP] Embed Pods Frameworks"; |
| 370 | 392 | outputPaths = ( |
| 371 | 393 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", |
| 372 | 394 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", |
| 373 | 395 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework", |
| 396 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCacheManagerKit.framework", | |
| 374 | 397 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework", |
| 398 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", | |
| 375 | 399 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonClass.framework", |
| 376 | 400 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework", |
| 377 | 401 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveManager.framework", |
| 378 | - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveQrCodeModule.framework", | |
| 379 | 402 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", |
| 380 | 403 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", |
| 381 | 404 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework", |
| 405 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", | |
| 382 | 406 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", |
| 383 | 407 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", |
| 384 | 408 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", |
| 385 | 409 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", |
| 386 | 410 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SGQRCode.framework", |
| 411 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ImSDK.framework", | |
| 387 | 412 | ); |
| 388 | 413 | runOnlyForDeploymentPostprocessing = 0; |
| 389 | 414 | shellPath = /bin/sh; | ... | ... |