Commit ed31012b397ec33e30e4edabf60593768e6ab253

Authored by zhangxiaowen
1 parent 42064c77

no message

CNLiveUserAgreementManager.podspec
... ... @@ -44,5 +44,8 @@ TODO: 网家家-用户协议管理类.
44 44  
45 45 # 数据请求
46 46 s.dependency 'CNLiveRequestBastKit'
  47 +
  48 + #类别
  49 + s.dependency 'CNLiveCategory'
47 50  
48 51 end
... ...
CNLiveUserAgreementManager/Classes/CNLiveUserAgreementWebController.m
... ... @@ -10,6 +10,7 @@
10 10 #import <WebKit/WebKit.h>
11 11 // 环境库
12 12 #import "CNLiveEnvironment.h"
  13 +#import "CNLiveCategory.h"
13 14  
14 15 #import <CNLiveRequestBastKit/CNLiveNetworking.h>
15 16  
... ... @@ -107,7 +108,7 @@ static const NSInteger margin = 15;
107 108 UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
108 109 leftBtn.adjustsImageWhenHighlighted = NO;
109 110 leftBtn.frame = CGRectMake(margin, [UIApplication sharedApplication].statusBarFrame.size.height, 44, 44);
110   - UIImage *leftImage = [self xw_getImageName:@"web_black_back" bundleName:@"CNLiveUserAgreementManager" targetClass:[CNLiveUserAgreementWebController class]];
  111 + UIImage *leftImage = [UIImage cn_getImageName:@"web_black_back" bundleName:@"CNLiveUserAgreementManager" targetClass:[CNLiveUserAgreementWebController class]];
111 112 [leftBtn setImage:[leftImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
112 113 [leftBtn addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
113 114 [leftBtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];
... ... @@ -116,7 +117,7 @@ static const NSInteger margin = 15;
116 117 UIButton *closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
117 118 closeBtn.adjustsImageWhenHighlighted = NO;
118 119 closeBtn.frame = CGRectMake(44+margin, [UIApplication sharedApplication].statusBarFrame.size.height, 44, 44);
119   - UIImage *closeImage = [self xw_getImageName:@"web_black_close" bundleName:@"CNLiveUserAgreementManager" targetClass:[CNLiveUserAgreementWebController class]];
  120 + UIImage *closeImage = [UIImage cn_getImageName:@"web_black_close" bundleName:@"CNLiveUserAgreementManager" targetClass:[CNLiveUserAgreementWebController class]];
120 121 [closeBtn setImage:[closeImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
121 122 [closeBtn addTarget:self action:@selector(closeClick) forControlEvents:UIControlEventTouchUpInside];
122 123 [closeBtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];
... ... @@ -294,21 +295,4 @@ static const NSInteger margin = 15;
294 295  
295 296 }
296 297  
297   -/**
298   - * 创建图片
299   - *
300   - * @param imageName 图片名字
301   - * @param bundleName 图片所在的bundle名字
302   - * @param targetClass 类和bundle的同级目录
303   - * @return 返回UIImage
304   - */
305   -- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{
306   - NSBundle *bundle = [NSBundle bundleForClass:targetClass];
307   - NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];
308   - NSBundle *targetBundle = [NSBundle bundleWithURL:url];
309   - UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];
310   - return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
311   -
312   -}
313   -
314 298 @end
... ...
Example/CNLiveUserAgreementManager.xcodeproj/project.pbxproj
... ... @@ -306,6 +306,7 @@
306 306 inputPaths = (
307 307 "${PODS_ROOT}/Target Support Files/Pods-CNLiveUserAgreementManager_Example/Pods-CNLiveUserAgreementManager_Example-frameworks.sh",
308 308 "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
  309 + "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework",
309 310 "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework",
310 311 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework",
311 312 "${BUILT_PRODUCTS_DIR}/CNLiveUserAgreementManager/CNLiveUserAgreementManager.framework",
... ... @@ -313,6 +314,7 @@
313 314 name = "[CP] Embed Pods Frameworks";
314 315 outputPaths = (
315 316 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
  317 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework",
316 318 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework",
317 319 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework",
318 320 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserAgreementManager.framework",
... ...