Commit 1af5ebba739d26165ce860a3ab5fa947f484e6db
1 parent
efb4111a
no message
Showing
14 changed files
with
239 additions
and
18 deletions
CNLiveCommonClass.podspec
| @@ -38,5 +38,7 @@ TODO: Add long description of the pod here. | @@ -38,5 +38,7 @@ TODO: Add long description of the pod here. | ||
| 38 | 38 | ||
| 39 | # s.public_header_files = 'Pod/Classes/**/*.h' | 39 | # s.public_header_files = 'Pod/Classes/**/*.h' |
| 40 | # s.frameworks = 'UIKit', 'MapKit' | 40 | # s.frameworks = 'UIKit', 'MapKit' |
| 41 | - # s.dependency 'AFNetworking', '~> 2.3' | 41 | + s.dependency 'QMUIKit' |
| 42 | + s.dependency 'CNLiveBaseKit' | ||
| 43 | + s.dependency 'CNLiveRequestBastKit' | ||
| 42 | end | 44 | end |
CNLiveCommonClass/Classes/CNCommonTableViewController.h
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import "QMUIKit.h" | 9 | #import "QMUIKit.h" |
| 10 | +#import "CNThemeProtocol.h" | ||
| 10 | 11 | ||
| 11 | @interface CNCommonTableViewController : QMUICommonTableViewController <CNChangingThemeDelegate> | 12 | @interface CNCommonTableViewController : QMUICommonTableViewController <CNChangingThemeDelegate> |
| 12 | 13 |
CNLiveCommonClass/Classes/CNCommonTableViewController.m
| @@ -7,8 +7,11 @@ | @@ -7,8 +7,11 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import "CNCommonTableViewController.h" | 9 | #import "CNCommonTableViewController.h" |
| 10 | -#import "CNAttentionViewController.h" | ||
| 11 | -#import "CNMineHomeController.h" | 10 | +//#import "CNAttentionViewController.h" |
| 11 | +//#import "CNMineHomeController.h" | ||
| 12 | +#import "QMUIKit.h" | ||
| 13 | +#import "CNThemeManager.h" | ||
| 14 | +#import "CNLiveBaseKit.h" | ||
| 12 | 15 | ||
| 13 | @interface CNCommonTableViewController () | 16 | @interface CNCommonTableViewController () |
| 14 | 17 | ||
| @@ -19,12 +22,12 @@ | @@ -19,12 +22,12 @@ | ||
| 19 | - (void)viewWillAppear:(BOOL)animated | 22 | - (void)viewWillAppear:(BOOL)animated |
| 20 | { | 23 | { |
| 21 | [super viewWillAppear:animated]; | 24 | [super viewWillAppear:animated]; |
| 22 | - if ([self isKindOfClass:[CNAttentionViewController class]] || [self isKindOfClass:[CNMineHomeController class]]) { | ||
| 23 | - self.tabBarController.tabBar.hidden = NO; | ||
| 24 | - }else{ | ||
| 25 | - | ||
| 26 | - self.tabBarController.tabBar.hidden = YES; | ||
| 27 | - } | 25 | +// if ([self isKindOfClass:[CNAttentionViewController class]] || [self isKindOfClass:[CNMineHomeController class]]) { |
| 26 | +// self.tabBarController.tabBar.hidden = NO; | ||
| 27 | +// }else{ | ||
| 28 | +// | ||
| 29 | +// self.tabBarController.tabBar.hidden = YES; | ||
| 30 | +// } | ||
| 28 | // self.navigationController.interactivePopGestureRecognizer.delegate = (id)self; | 31 | // self.navigationController.interactivePopGestureRecognizer.delegate = (id)self; |
| 29 | } | 32 | } |
| 30 | 33 | ||
| @@ -66,7 +69,7 @@ | @@ -66,7 +69,7 @@ | ||
| 66 | 69 | ||
| 67 | - (void)setCNNoNetworkingEmptyView | 70 | - (void)setCNNoNetworkingEmptyView |
| 68 | { | 71 | { |
| 69 | - self.emptyView.backgroundColor = kWhiteColor; | 72 | + self.emptyView.backgroundColor = [UIColor whiteColor]; |
| 70 | self.emptyView.actionButton.backgroundColor = UIColorMake(0, 194, 0); | 73 | self.emptyView.actionButton.backgroundColor = UIColorMake(0, 194, 0); |
| 71 | self.emptyView.actionButton.layer.masksToBounds = YES; | 74 | self.emptyView.actionButton.layer.masksToBounds = YES; |
| 72 | self.emptyView.actionButton.layer.cornerRadius = 6; | 75 | self.emptyView.actionButton.layer.cornerRadius = 6; |
| @@ -113,9 +116,26 @@ | @@ -113,9 +116,26 @@ | ||
| 113 | 116 | ||
| 114 | - (UIImage *)navigationBarBackgroundImage | 117 | - (UIImage *)navigationBarBackgroundImage |
| 115 | { | 118 | { |
| 116 | - return [UIImage imageWithColor:kWhiteColor]; | 119 | + return [self imageWithColor:[UIColor whiteColor]]; |
| 120 | +} | ||
| 121 | +- (UIImage *)imageWithColor:(UIColor *)color { | ||
| 122 | + return [self imageWithColor:color size:CGSizeMake(1, 1)]; | ||
| 117 | } | 123 | } |
| 118 | 124 | ||
| 125 | +- (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size { | ||
| 126 | + if (color == nil) { | ||
| 127 | + return nil; | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + CGRect rect=CGRectMake(0.0f, 0.0f, size.width, size.height); | ||
| 131 | + UIGraphicsBeginImageContext(rect.size); | ||
| 132 | + CGContextRef context = UIGraphicsGetCurrentContext(); | ||
| 133 | + CGContextSetFillColorWithColor(context, [color CGColor]); | ||
| 134 | + CGContextFillRect(context, rect); | ||
| 135 | + UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext(); | ||
| 136 | + UIGraphicsEndImageContext(); | ||
| 137 | + return theImage; | ||
| 138 | +} | ||
| 119 | - (UIInterfaceOrientationMask)supportedOrientationMask | 139 | - (UIInterfaceOrientationMask)supportedOrientationMask |
| 120 | { | 140 | { |
| 121 | return UIInterfaceOrientationMaskPortrait; | 141 | return UIInterfaceOrientationMaskPortrait; |
CNLiveCommonClass/Classes/CNCommonView.h
CNLiveCommonClass/Classes/CNCommonView.m
CNLiveCommonClass/Classes/CNCommonViewController.h
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import "CNThemeProtocol.h" | 9 | #import "CNThemeProtocol.h" |
| 10 | +#import "QMUICommonViewController.h" | ||
| 10 | 11 | ||
| 11 | @interface CNCommonViewController : QMUICommonViewController <CNChangingThemeDelegate> | 12 | @interface CNCommonViewController : QMUICommonViewController <CNChangingThemeDelegate> |
| 12 | 13 |
CNLiveCommonClass/Classes/CNCommonViewController.m
| @@ -8,6 +8,8 @@ | @@ -8,6 +8,8 @@ | ||
| 8 | 8 | ||
| 9 | #import "CNCommonViewController.h" | 9 | #import "CNCommonViewController.h" |
| 10 | #import <CNLiveRequestBastKit/CNLiveNetworking.h> | 10 | #import <CNLiveRequestBastKit/CNLiveNetworking.h> |
| 11 | +#import "QMUIKit.h" | ||
| 12 | +#import "CNThemeManager.h" | ||
| 11 | 13 | ||
| 12 | @interface CNCommonViewController () | 14 | @interface CNCommonViewController () |
| 13 | 15 | ||
| @@ -40,7 +42,7 @@ | @@ -40,7 +42,7 @@ | ||
| 40 | } | 42 | } |
| 41 | #pragma mark - UI | 43 | #pragma mark - UI |
| 42 | - (void)setCNNoNetworkingEmptyView { | 44 | - (void)setCNNoNetworkingEmptyView { |
| 43 | - self.emptyView.backgroundColor = kWhiteColor; | 45 | + self.emptyView.backgroundColor = [UIColor whiteColor]; |
| 44 | self.emptyView.actionButton.backgroundColor = UIColorMake(0, 194, 0); | 46 | self.emptyView.actionButton.backgroundColor = UIColorMake(0, 194, 0); |
| 45 | self.emptyView.actionButton.layer.masksToBounds = YES; | 47 | self.emptyView.actionButton.layer.masksToBounds = YES; |
| 46 | self.emptyView.actionButton.layer.cornerRadius = 6; | 48 | self.emptyView.actionButton.layer.cornerRadius = 6; |
| @@ -73,8 +75,7 @@ | @@ -73,8 +75,7 @@ | ||
| 73 | } | 75 | } |
| 74 | #pragma mark - Network Monitoring | 76 | #pragma mark - Network Monitoring |
| 75 | - (void)p_startNetworkMonitoring { | 77 | - (void)p_startNetworkMonitoring { |
| 76 | - weakself | ||
| 77 | - | 78 | + __weak typeof(self) weakSelf = self; |
| 78 | [CNLiveNetworking networkStatusWithBlock:^(CNLiveNetworkStatusType status) { | 79 | [CNLiveNetworking networkStatusWithBlock:^(CNLiveNetworkStatusType status) { |
| 79 | if (status == CNLiveNetworkStatusUnknown || status == CNLiveNetworkStatusNotReachable) { | 80 | if (status == CNLiveNetworkStatusUnknown || status == CNLiveNetworkStatusNotReachable) { |
| 80 | weakSelf.netStatus = status; | 81 | weakSelf.netStatus = status; |
| @@ -120,7 +121,25 @@ | @@ -120,7 +121,25 @@ | ||
| 120 | } | 121 | } |
| 121 | #pragma mark - Navigation Delegate | 122 | #pragma mark - Navigation Delegate |
| 122 | - (UIImage *)navigationBarBackgroundImage { | 123 | - (UIImage *)navigationBarBackgroundImage { |
| 123 | - return [UIImage imageWithColor:kWhiteColor]; | 124 | + return [self imageWithColor:[UIColor whiteColor]]; |
| 125 | +} | ||
| 126 | +- (UIImage *)imageWithColor:(UIColor *)color { | ||
| 127 | + return [self imageWithColor:color size:CGSizeMake(1, 1)]; | ||
| 128 | +} | ||
| 129 | + | ||
| 130 | +- (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size { | ||
| 131 | + if (color == nil) { | ||
| 132 | + return nil; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + CGRect rect=CGRectMake(0.0f, 0.0f, size.width, size.height); | ||
| 136 | + UIGraphicsBeginImageContext(rect.size); | ||
| 137 | + CGContextRef context = UIGraphicsGetCurrentContext(); | ||
| 138 | + CGContextSetFillColorWithColor(context, [color CGColor]); | ||
| 139 | + CGContextFillRect(context, rect); | ||
| 140 | + UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext(); | ||
| 141 | + UIGraphicsEndImageContext(); | ||
| 142 | + return theImage; | ||
| 124 | } | 143 | } |
| 125 | 144 | ||
| 126 | #pragma mark - System Delegate | 145 | #pragma mark - System Delegate |
CNLiveCommonClass/Classes/CNLiveCommonClass.h
0 โ 100644
| 1 | +// | ||
| 2 | +// CNLiveCommonClass.h | ||
| 3 | +// Pods | ||
| 4 | +// | ||
| 5 | +// Created by CNLive-zxw on 2019/4/12. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +#ifndef CNLiveCommonClass_h | ||
| 9 | +#define CNLiveCommonClass_h | ||
| 10 | + | ||
| 11 | +#import "CNThemeManager.h" | ||
| 12 | +#import "CNCommonView.h" | ||
| 13 | + | ||
| 14 | +#import "CNCommonViewController.h" | ||
| 15 | +#import "CNCommonTableViewController.h" | ||
| 16 | +#import "CNCommonListViewController.h" | ||
| 17 | + | ||
| 18 | +#endif /* CNLiveCommonClass_h */ |
CNLiveCommonClass/Classes/CNThemeManager.h
0 โ 100644
| 1 | +// | ||
| 2 | +// CNThemeManager.h | ||
| 3 | +// CNLiveNetAdd | ||
| 4 | +// | ||
| 5 | +// Created by ๅผ ๆญ on 2017/12/30. | ||
| 6 | +// Copyright ยฉ 2017ๅนด cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import "CNThemeProtocol.h" | ||
| 11 | + | ||
| 12 | +/// ๅฝไธป้ขๅ็ๅๅๆถ๏ผไผๅ้่ฟไธช้็ฅ | ||
| 13 | +extern NSString *const CNThemeChangedNotification; | ||
| 14 | + | ||
| 15 | +/// ไธป้ขๅ็ๆนๅๅ็ๅผ๏ผ็ฑปๅไธบ NSObject<CNThemeProtocol>๏ผๅฏ่ฝไธบ NSNull | ||
| 16 | +extern NSString *const CNThemeBeforeChangedName; | ||
| 17 | + | ||
| 18 | +/// ไธป้ขๅ็ๆนๅๅ็ๅผ๏ผ็ฑปๅไธบ NSObject<CNThemeProtocol>๏ผๅฏ่ฝไธบ NSNull | ||
| 19 | +extern NSString *const CNThemeAfterChangedName; | ||
| 20 | + | ||
| 21 | +/** | ||
| 22 | + * QMUI Demo ็็ฎ่ค็ฎก็ๅจ๏ผๅฝ้่ฆๆข่คๆถ๏ผ่ฏทไธบ currentTheme ่ตๅผ๏ผๅฝ้่ฆ่ทๅๅฝๅ็ฎ่คๆถ๏ผๅฏ่ฎฟ้ฎ currentTheme ๅฑๆงใ | ||
| 23 | + * ๅฏ้่ฟ็ๅฌ CNThemeChangedNotification ้็ฅๆฅๆ่ทๆข่คไบไปถ๏ผ้ป่ฎคๅฐ๏ผCNCommonViewController ๅ CNCommonTableViewController ๅๅทฒๆฏๆๅๅบๆข่ค๏ผๅ ถๅๅบๆนๆณๆฏ้่ฟ CNChangingThemeDelegate ๆฅๅฃๆฅๅฎ็ฐ็ใ | ||
| 24 | + */ | ||
| 25 | +@interface CNThemeManager : NSObject | ||
| 26 | ++ (instancetype)sharedInstance; | ||
| 27 | + | ||
| 28 | +@property(nonatomic, strong) NSObject<CNThemeProtocol> *currentTheme; | ||
| 29 | +@end |
CNLiveCommonClass/Classes/CNThemeManager.m
0 โ 100644
| 1 | +// | ||
| 2 | +// CNThemeManager.m | ||
| 3 | +// CNLiveNetAdd | ||
| 4 | +// | ||
| 5 | +// Created by ๅผ ๆญ on 2017/12/30. | ||
| 6 | +// Copyright ยฉ 2017ๅนด cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNThemeManager.h" | ||
| 10 | + | ||
| 11 | +NSString *const CNThemeChangedNotification = @"CNThemeChangedNotification"; | ||
| 12 | +NSString *const CNThemeBeforeChangedName = @"CNThemeBeforeChangedName"; | ||
| 13 | +NSString *const CNThemeAfterChangedName = @"CNThemeAfterChangedName"; | ||
| 14 | + | ||
| 15 | +@implementation CNThemeManager | ||
| 16 | + | ||
| 17 | ++ (instancetype)sharedInstance { | ||
| 18 | + static dispatch_once_t onceToken; | ||
| 19 | + static CNThemeManager *instance = nil; | ||
| 20 | + dispatch_once(&onceToken,^{ | ||
| 21 | + instance = [[super allocWithZone:NULL] init]; | ||
| 22 | + }); | ||
| 23 | + return instance; | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | ++ (id)allocWithZone:(struct _NSZone *)zone{ | ||
| 27 | + return [self sharedInstance]; | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +- (void)setCurrentTheme:(NSObject<CNThemeProtocol> *)currentTheme { | ||
| 31 | + BOOL isThemeChanged = _currentTheme != currentTheme; | ||
| 32 | + NSObject<CNThemeProtocol> *themeBeforeChanged = nil; | ||
| 33 | + if (isThemeChanged) { | ||
| 34 | + themeBeforeChanged = _currentTheme; | ||
| 35 | + } | ||
| 36 | + _currentTheme = currentTheme; | ||
| 37 | + if (isThemeChanged) { | ||
| 38 | + [currentTheme setupConfigurationTemplate]; | ||
| 39 | + [[NSNotificationCenter defaultCenter] postNotificationName:CNThemeChangedNotification object:self userInfo:@{CNThemeBeforeChangedName: themeBeforeChanged ?: [NSNull null], CNThemeAfterChangedName: currentTheme ?: [NSNull null]}]; | ||
| 40 | + } | ||
| 41 | +} | ||
| 42 | + | ||
| 43 | +@end |
CNLiveCommonClass/Classes/CNThemeProtocol.h
0 โ 100644
| 1 | +// | ||
| 2 | +// CNThemeProtocol.h | ||
| 3 | +// CNLiveNetAdd | ||
| 4 | +// | ||
| 5 | +// Created by ๅผ ๆญ on 2017/12/30. | ||
| 6 | +// Copyright ยฉ 2017ๅนด cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | + | ||
| 10 | +#import <Foundation/Foundation.h> | ||
| 11 | + | ||
| 12 | +/// ๆๆไธป้ขๅๅบๅฎ็ฐ่ฟไธชๅ่ฎฎ๏ผ่งๅฎไบ QMUI Demo ้ๅธธ็จ็ๅ ไธชๅ ณ้ฎๅค่งๅฑๆง | ||
| 13 | +@protocol CNThemeProtocol <NSObject> | ||
| 14 | + | ||
| 15 | +@required | ||
| 16 | + | ||
| 17 | +/// ๆฅ่ชไบ QMUIConfigurationTemplate ้็่ชๅธฆๆนๆณ๏ผ็จไบๅบ็จ้ ็ฝฎ่กจ้็่ฎพ็ฝฎ | ||
| 18 | +- (void)setupConfigurationTemplate; | ||
| 19 | + | ||
| 20 | +- (UIColor *)themeTintColor; | ||
| 21 | +- (UIColor *)themeListTextColor; | ||
| 22 | +- (UIColor *)themeCodeColor; | ||
| 23 | +- (UIColor *)themeGridItemTintColor; | ||
| 24 | + | ||
| 25 | +- (NSString *)themeName; | ||
| 26 | + | ||
| 27 | +@end | ||
| 28 | + | ||
| 29 | + | ||
| 30 | +/// ๆๆ่ฝๅๅบไธป้ขๅๅ็ๅฏน่ฑกๅๅบๅฎ็ฐ่ฟไธชๅ่ฎฎ๏ผ็ฎๅไธป่ฆ็จไบ CNCommonViewController ๅ CNCommonTableViewController | ||
| 31 | +@protocol CNChangingThemeDelegate <NSObject> | ||
| 32 | + | ||
| 33 | +@required | ||
| 34 | + | ||
| 35 | +- (void)themeBeforeChanged:(NSObject<CNThemeProtocol> *)themeBeforeChanged afterChanged:(NSObject<CNThemeProtocol> *)themeAfterChanged; | ||
| 36 | + | ||
| 37 | +@end |
Example/CNLiveCommonClass.xcodeproj/project.pbxproj
| @@ -226,6 +226,7 @@ | @@ -226,6 +226,7 @@ | ||
| 226 | 6003F5AA195388D20070C39A /* Sources */, | 226 | 6003F5AA195388D20070C39A /* Sources */, |
| 227 | 6003F5AB195388D20070C39A /* Frameworks */, | 227 | 6003F5AB195388D20070C39A /* Frameworks */, |
| 228 | 6003F5AC195388D20070C39A /* Resources */, | 228 | 6003F5AC195388D20070C39A /* Resources */, |
| 229 | + FAC38C7F6FF8CF304CD35A48 /* [CP] Embed Pods Frameworks */, | ||
| 229 | ); | 230 | ); |
| 230 | buildRules = ( | 231 | buildRules = ( |
| 231 | ); | 232 | ); |
| @@ -350,19 +351,59 @@ | @@ -350,19 +351,59 @@ | ||
| 350 | ); | 351 | ); |
| 351 | inputPaths = ( | 352 | inputPaths = ( |
| 352 | "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveCommonClass_Example/Pods-CNLiveCommonClass_Example-frameworks.sh", | 353 | "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveCommonClass_Example/Pods-CNLiveCommonClass_Example-frameworks.sh", |
| 354 | + "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", | ||
| 355 | + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | ||
| 353 | "${BUILT_PRODUCTS_DIR}/CNLiveCommonClass/CNLiveCommonClass.framework", | 356 | "${BUILT_PRODUCTS_DIR}/CNLiveCommonClass/CNLiveCommonClass.framework", |
| 357 | + "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", | ||
| 358 | + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | ||
| 359 | + "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | ||
| 354 | ); | 360 | ); |
| 355 | name = "[CP] Embed Pods Frameworks"; | 361 | name = "[CP] Embed Pods Frameworks"; |
| 356 | outputFileListPaths = ( | 362 | outputFileListPaths = ( |
| 357 | ); | 363 | ); |
| 358 | outputPaths = ( | 364 | outputPaths = ( |
| 365 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", | ||
| 366 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | ||
| 359 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonClass.framework", | 367 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonClass.framework", |
| 368 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", | ||
| 369 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | ||
| 370 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | ||
| 360 | ); | 371 | ); |
| 361 | runOnlyForDeploymentPostprocessing = 0; | 372 | runOnlyForDeploymentPostprocessing = 0; |
| 362 | shellPath = /bin/sh; | 373 | shellPath = /bin/sh; |
| 363 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CNLiveCommonClass_Example/Pods-CNLiveCommonClass_Example-frameworks.sh\"\n"; | 374 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CNLiveCommonClass_Example/Pods-CNLiveCommonClass_Example-frameworks.sh\"\n"; |
| 364 | showEnvVarsInLog = 0; | 375 | showEnvVarsInLog = 0; |
| 365 | }; | 376 | }; |
| 377 | + FAC38C7F6FF8CF304CD35A48 /* [CP] Embed Pods Frameworks */ = { | ||
| 378 | + isa = PBXShellScriptBuildPhase; | ||
| 379 | + buildActionMask = 2147483647; | ||
| 380 | + files = ( | ||
| 381 | + ); | ||
| 382 | + inputFileListPaths = ( | ||
| 383 | + ); | ||
| 384 | + inputPaths = ( | ||
| 385 | + "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveCommonClass_Tests/Pods-CNLiveCommonClass_Tests-frameworks.sh", | ||
| 386 | + "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", | ||
| 387 | + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | ||
| 388 | + "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", | ||
| 389 | + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | ||
| 390 | + "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | ||
| 391 | + ); | ||
| 392 | + name = "[CP] Embed Pods Frameworks"; | ||
| 393 | + outputFileListPaths = ( | ||
| 394 | + ); | ||
| 395 | + outputPaths = ( | ||
| 396 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", | ||
| 397 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | ||
| 398 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", | ||
| 399 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | ||
| 400 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | ||
| 401 | + ); | ||
| 402 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 403 | + shellPath = /bin/sh; | ||
| 404 | + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CNLiveCommonClass_Tests/Pods-CNLiveCommonClass_Tests-frameworks.sh\"\n"; | ||
| 405 | + showEnvVarsInLog = 0; | ||
| 406 | + }; | ||
| 366 | /* End PBXShellScriptBuildPhase section */ | 407 | /* End PBXShellScriptBuildPhase section */ |
| 367 | 408 | ||
| 368 | /* Begin PBXSourcesBuildPhase section */ | 409 | /* Begin PBXSourcesBuildPhase section */ |
Example/CNLiveCommonClass/CNLiveViewController.m
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import "CNLiveViewController.h" | 9 | #import "CNLiveViewController.h" |
| 10 | +#import "CNLiveCommonClass.h" | ||
| 10 | 11 | ||
| 11 | @interface CNLiveViewController () | 12 | @interface CNLiveViewController () |
| 12 | 13 | ||
| @@ -18,6 +19,7 @@ | @@ -18,6 +19,7 @@ | ||
| 18 | { | 19 | { |
| 19 | [super viewDidLoad]; | 20 | [super viewDidLoad]; |
| 20 | // Do any additional setup after loading the view, typically from a nib. | 21 | // Do any additional setup after loading the view, typically from a nib. |
| 22 | + | ||
| 21 | } | 23 | } |
| 22 | 24 | ||
| 23 | - (void)didReceiveMemoryWarning | 25 | - (void)didReceiveMemoryWarning |
Example/Podfile
| 1 | +source 'https://github.com/CocoaPods/Specs.git' | ||
| 2 | +source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git' | ||
| 1 | use_frameworks! | 3 | use_frameworks! |
| 2 | 4 | ||
| 3 | -platform :ios, '8.0' | 5 | +platform :ios, '9.0' |
| 4 | 6 | ||
| 5 | target 'CNLiveCommonClass_Example' do | 7 | target 'CNLiveCommonClass_Example' do |
| 6 | pod 'CNLiveCommonClass', :path => '../' | 8 | pod 'CNLiveCommonClass', :path => '../' |
| 9 | + pod 'QMUIKit' | ||
| 10 | + pod 'CNLiveRequestBastKit' | ||
| 11 | + pod 'CNLiveBaseKit' | ||
| 7 | 12 | ||
| 8 | target 'CNLiveCommonClass_Tests' do | 13 | target 'CNLiveCommonClass_Tests' do |
| 9 | inherit! :search_paths | 14 | inherit! :search_paths |
| 10 | - | 15 | + pod 'QMUIKit' |
| 16 | + pod 'CNLiveRequestBastKit' | ||
| 17 | + pod 'CNLiveBaseKit' | ||
| 11 | 18 | ||
| 12 | end | 19 | end |
| 13 | end | 20 | end |