Commit 220d686c18418ee8f06f74ddadd73f4e13e59720

Authored by zhangxiaowen
1 parent 9b145d92

no message

CNLiveSettingModule.podspec
@@ -153,6 +153,9 @@ TODO: 网家家-设置模块. @@ -153,6 +153,9 @@ TODO: 网家家-设置模块.
153 153
154 # 管理类 154 # 管理类
155 s.dependency 'CNLiveManager' 155 s.dependency 'CNLiveManager'
  156 +
  157 + # 分类
  158 + s.dependency 'CNLiveCategory'
156 159
157 s.static_framework = true 160 s.static_framework = true
158 161
CNLiveSettingModule/Classes/AboutUs/CNLiveAboutUsController.m
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 #import "CNLiveServices.h" 13 #import "CNLiveServices.h"
14 #import "CNLiveUserAgreementManager.h" 14 #import "CNLiveUserAgreementManager.h"
15 #import "CNLiveEnvironment.h" 15 #import "CNLiveEnvironment.h"
  16 +#import "CNLiveCategory.h"
16 17
17 #import "CNLiveSettingModel.h" 18 #import "CNLiveSettingModel.h"
18 #import "CNLiveSettingCell.h" 19 #import "CNLiveSettingCell.h"
@@ -259,7 +260,7 @@ static const NSInteger timeValue = 1.5; @@ -259,7 +260,7 @@ static const NSInteger timeValue = 1.5;
259 _headerView.clipsToBounds = YES; 260 _headerView.clipsToBounds = YES;
260 _headerView.backgroundColor = [UIColor colorWithRed:242/255.0 green:242/255.0 blue:242/255.0 alpha:1.0]; 261 _headerView.backgroundColor = [UIColor colorWithRed:242/255.0 green:242/255.0 blue:242/255.0 alpha:1.0];
261 UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-70)/2.0, 30, 70, 140)]; 262 UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-70)/2.0, 30, 70, 140)];
262 - UIImage *image = [self xw_getImageName:@"about_us_icon" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveSettingNavigationBar class]]; 263 + UIImage *image = [UIImage cn_getImageName:@"about_us_icon" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveSettingNavigationBar class]];
263 imageView.image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; 264 imageView.image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
264 imageView.contentMode = UIViewContentModeScaleAspectFill; 265 imageView.contentMode = UIViewContentModeScaleAspectFill;
265 imageView.clipsToBounds = YES; 266 imageView.clipsToBounds = YES;
CNLiveSettingModule/Classes/Cancellation/CNLiveCancellationView.m
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 #import "CNLiveCancellationView.h" 9 #import "CNLiveCancellationView.h"
10 #import "YYKit.h" 10 #import "YYKit.h"
11 #import <Masonry/Masonry.h> 11 #import <Masonry/Masonry.h>
  12 +#import "CNLiveCategory.h"
12 13
13 @interface CNLiveCancellationView()<UITextViewDelegate> 14 @interface CNLiveCancellationView()<UITextViewDelegate>
14 @property (nonatomic, strong) UIButton *agreeBtn; 15 @property (nonatomic, strong) UIButton *agreeBtn;
@@ -105,9 +106,9 @@ static const NSInteger margin = 15; @@ -105,9 +106,9 @@ static const NSInteger margin = 15;
105 - (UIButton *)agreeBtn{ 106 - (UIButton *)agreeBtn{
106 if (!_agreeBtn) { 107 if (!_agreeBtn) {
107 _agreeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 108 _agreeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
108 - UIImage *xw_image1 = [self xw_getImageName:@"cancellation_agree" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveCancellationView class]]; 109 + UIImage *xw_image1 = [UIImage cn_getImageName:@"cancellation_agree" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveCancellationView class]];
109 110
110 - UIImage *xw_image2 = [self xw_getImageName:@"cancellation_agree_sel" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveCancellationView class]]; 111 + UIImage *xw_image2 = [UIImage cn_getImageName:@"cancellation_agree_sel" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveCancellationView class]];
111 112
112 [_agreeBtn setImage:xw_image1 forState:UIControlStateNormal]; 113 [_agreeBtn setImage:xw_image1 forState:UIControlStateNormal];
113 [_agreeBtn setImage:xw_image2 forState:UIControlStateSelected]; 114 [_agreeBtn setImage:xw_image2 forState:UIControlStateSelected];
CNLiveSettingModule/Classes/FontSIze/CNLiveFontSettingCell.m
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 #import <SDWebImage/SDWebImage.h> 10 #import <SDWebImage/SDWebImage.h>
11 11
12 #import "CNLiveBaseKit.h" 12 #import "CNLiveBaseKit.h"
  13 +#import "CNLiveCategory.h"
13 14
14 #import "CNLiveFontSettingModel.h" 15 #import "CNLiveFontSettingModel.h"
15 #import "CNLiveFontSettingFrame.h" 16 #import "CNLiveFontSettingFrame.h"
@@ -49,7 +50,7 @@ @@ -49,7 +50,7 @@
49 50
50 // 1.设置头像 51 // 1.设置头像
51 self.headImage.frame = fontSettingFrame.iconFrame; 52 self.headImage.frame = fontSettingFrame.iconFrame;
52 - UIImage *image = [self xw_getImageName:@"font_size_logo" bundleName:@"CNLiveSettingModule" targetClass:[self class]]; 53 + UIImage *image = [UIImage cn_getImageName:@"font_size_logo" bundleName:@"CNLiveSettingModule" targetClass:[self class]];
53 [_headImage sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:image]; 54 [_headImage sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:image];
54 55
55 // 2.设置内容 56 // 2.设置内容
CNLiveSettingModule/Classes/FontSIze/CNLiveFontSettingContentButton.m
@@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
8 8
9 #import "CNLiveFontSettingContentButton.h" 9 #import "CNLiveFontSettingContentButton.h"
10 #import "CNLiveBaseKit.h" 10 #import "CNLiveBaseKit.h"
  11 +#import "CNLiveCategory.h"
  12 +
11 #import "CNLiveFontSettingFrame.h" 13 #import "CNLiveFontSettingFrame.h"
12 #import "CNLiveFontSettingModel.h" 14 #import "CNLiveFontSettingModel.h"
13 15
@@ -35,11 +37,11 @@ @@ -35,11 +37,11 @@
35 CNLiveFontSettingModel *FontSetting = fontSettingFrame.model; 37 CNLiveFontSettingModel *FontSetting = fontSettingFrame.model;
36 38
37 if ([FontSetting.fromMe isEqualToString:@"1"]) { 39 if ([FontSetting.fromMe isEqualToString:@"1"]) {
38 - normal = [self xw_getImageName:@"font_size_message_me" bundleName:@"CNLiveSettingModule" targetClass:[self class]]; 40 + normal = [UIImage cn_getImageName:@"font_size_message_me" bundleName:@"CNLiveSettingModule" targetClass:[self class]];
39 normal = [normal stretchableImageWithLeftCapWidth:normal.size.width * 0.5 topCapHeight:normal.size.height * 0.9]; 41 normal = [normal stretchableImageWithLeftCapWidth:normal.size.width * 0.5 topCapHeight:normal.size.height * 0.9];
40 } 42 }
41 else{ 43 else{
42 - normal = [self xw_getImageName:@"font_size_message_other" bundleName:@"CNLiveSettingModule" targetClass:[self class]]; 44 + normal = [UIImage cn_getImageName:@"font_size_message_other" bundleName:@"CNLiveSettingModule" targetClass:[self class]];
43 normal = [normal stretchableImageWithLeftCapWidth:normal.size.width * 0.5 topCapHeight:normal.size.height * 0.9]; 45 normal = [normal stretchableImageWithLeftCapWidth:normal.size.width * 0.5 topCapHeight:normal.size.height * 0.9];
44 } 46 }
45 47
CNLiveSettingModule/Classes/FontSIze/CNLiveFontSettingController.m
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
11 #import "QMUIKit.h" 11 #import "QMUIKit.h"
12 #import "CNLiveBaseKit.h" 12 #import "CNLiveBaseKit.h"
13 #import "CNUserInfoManager.h" 13 #import "CNUserInfoManager.h"
  14 +#import "CNLiveCategory.h"
14 15
15 #import "CNLiveSettingNavigationBar.h" 16 #import "CNLiveSettingNavigationBar.h"
16 #import "CNLiveFontSettingFrame.h" 17 #import "CNLiveFontSettingFrame.h"
@@ -118,7 +119,7 @@ @@ -118,7 +119,7 @@
118 //背景图 119 //背景图
119 UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width-70-30, 8)]; 120 UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width-70-30, 8)];
120 imageView.center = self.slider.center; 121 imageView.center = self.slider.center;
121 - UIImage *image = [self xw_getImageName:@"font_size_slider" bundleName:@"CNLiveSettingModule" targetClass:[self class]]; 122 + UIImage *image = [UIImage cn_getImageName:@"font_size_slider" bundleName:@"CNLiveSettingModule" targetClass:[self class]];
122 imageView.image = image; 123 imageView.image = image;
123 [bottomView addSubview:imageView]; 124 [bottomView addSubview:imageView];
124 [bottomView addSubview:self.slider]; 125 [bottomView addSubview:self.slider];
CNLiveSettingModule/Classes/Privacy/CNLiveNotSeeCollectionViewCell.m
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 #import <SDWebImage/SDWebImage.h> 10 #import <SDWebImage/SDWebImage.h>
11 #import "QMUIKit.h" 11 #import "QMUIKit.h"
12 #import <Masonry/Masonry.h> 12 #import <Masonry/Masonry.h>
  13 +#import "CNLiveCategory.h"
13 14
14 #import "CNLiveNotSeeModel.h" 15 #import "CNLiveNotSeeModel.h"
15 16
@@ -37,14 +38,14 @@ @@ -37,14 +38,14 @@
37 if(model.type == CNLiveNotSeeModelTypeAdd){ 38 if(model.type == CNLiveNotSeeModelTypeAdd){
38 _avatarImage.layer.masksToBounds = NO; 39 _avatarImage.layer.masksToBounds = NO;
39 _avatarImage.layer.cornerRadius = 0; 40 _avatarImage.layer.cornerRadius = 0;
40 - UIImage *xw_image = [self xw_getImageName:@"privacy_plus" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveNotSeeCollectionViewCell class]]; 41 + UIImage *xw_image = [UIImage cn_getImageName:@"privacy_plus" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveNotSeeCollectionViewCell class]];
41 [_avatarImage sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:xw_image]; 42 [_avatarImage sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:xw_image];
42 _nameLabel.text = @""; 43 _nameLabel.text = @"";
43 44
44 }else if (model.type == CNLiveNotSeeModelTypeMinus){ 45 }else if (model.type == CNLiveNotSeeModelTypeMinus){
45 _avatarImage.layer.masksToBounds = NO; 46 _avatarImage.layer.masksToBounds = NO;
46 _avatarImage.layer.cornerRadius = 0; 47 _avatarImage.layer.cornerRadius = 0;
47 - UIImage *xw_image = [self xw_getImageName:@"privacy_less" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveNotSeeCollectionViewCell class]]; 48 + UIImage *xw_image = [UIImage cn_getImageName:@"privacy_less" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveNotSeeCollectionViewCell class]];
48 [_avatarImage sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:xw_image]; 49 [_avatarImage sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:xw_image];
49 _nameLabel.text = @""; 50 _nameLabel.text = @"";
50 51
@@ -146,21 +147,4 @@ @@ -146,21 +147,4 @@
146 } 147 }
147 } 148 }
148 149
149 -/**  
150 - * 创建图片  
151 - *  
152 - * @param imageName 图片名字  
153 - * @param bundleName 图片所在的bundle名字  
154 - * @param targetClass 类和bundle的同级目录  
155 - * @return 返回UIImage  
156 - */  
157 -- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{  
158 - NSBundle *bundle = [NSBundle bundleForClass:targetClass];  
159 - NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];  
160 - NSBundle *targetBundle = [NSBundle bundleWithURL:url];  
161 - UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];  
162 - return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];  
163 -  
164 -}  
165 -  
166 @end 150 @end
CNLiveSettingModule/Classes/Privacy/CNLivePrivacyContactTableViewCell.m
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 #import "CNLivePrivacyContactTableViewCell.h" 9 #import "CNLivePrivacyContactTableViewCell.h"
10 #import <Masonry/Masonry.h> 10 #import <Masonry/Masonry.h>
11 #import "QMUIKit.h" 11 #import "QMUIKit.h"
  12 +#import "CNLiveCategory.h"
12 13
13 @interface CNLivePrivacyContactTableViewCell () 14 @interface CNLivePrivacyContactTableViewCell ()
14 @property (nonatomic, strong) UIImageView *iconImage; 15 @property (nonatomic, strong) UIImageView *iconImage;
@@ -193,26 +194,10 @@ @@ -193,26 +194,10 @@
193 194
194 - (UIImageView *)moreImage { 195 - (UIImageView *)moreImage {
195 if (!_moreImage) { 196 if (!_moreImage) {
196 - UIImage *xw_image = [self xw_getImageName:@"mine_info_front" bundleName:@"CNLiveSettingModule" targetClass:[CNLivePrivacyContactTableViewCell class]]; 197 + UIImage *xw_image = [UIImage cn_getImageName:@"mine_info_front" bundleName:@"CNLiveSettingModule" targetClass:[CNLivePrivacyContactTableViewCell class]];
197 _moreImage = [[UIImageView alloc] initWithImage:xw_image]; 198 _moreImage = [[UIImageView alloc] initWithImage:xw_image];
198 } 199 }
199 return _moreImage; 200 return _moreImage;
200 } 201 }
201 202
202 -/**  
203 - * 创建图片  
204 - *  
205 - * @param imageName 图片名字  
206 - * @param bundleName 图片所在的bundle名字  
207 - * @param targetClass 类和bundle的同级目录  
208 - * @return 返回UIImage  
209 - */  
210 -- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{  
211 - NSBundle *bundle = [NSBundle bundleForClass:targetClass];  
212 - NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];  
213 - NSBundle *targetBundle = [NSBundle bundleWithURL:url];  
214 - UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];  
215 - return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];  
216 -}  
217 -  
218 @end 203 @end
CNLiveSettingModule/Classes/Privacy/CNLivePrivacyTableViewCell.m
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 #import "CNLiveNetworking.h" 14 #import "CNLiveNetworking.h"
15 #import "CNLiveEnvironment.h" 15 #import "CNLiveEnvironment.h"
16 #import "CNUserInfoManager.h" 16 #import "CNUserInfoManager.h"
  17 +#import "CNLiveCategory.h"
17 18
18 #import "CNLivePrivacyModel.h" 19 #import "CNLivePrivacyModel.h"
19 20
@@ -140,7 +141,7 @@ static const NSInteger margin = 12; @@ -140,7 +141,7 @@ static const NSInteger margin = 12;
140 - (UIImageView *)arrowImage { 141 - (UIImageView *)arrowImage {
141 if (!_arrowImage) { 142 if (!_arrowImage) {
142 _arrowImage = [[UIImageView alloc] init]; 143 _arrowImage = [[UIImageView alloc] init];
143 - UIImage *xw_image = [self xw_getImageName:@"mine_info_front" bundleName:@"CNLiveSettingModule" targetClass:[CNLivePrivacyTableViewCell class]]; 144 + UIImage *xw_image = [UIImage cn_getImageName:@"mine_info_front" bundleName:@"CNLiveSettingModule" targetClass:[CNLivePrivacyTableViewCell class]];
144 _arrowImage.image = xw_image; 145 _arrowImage.image = xw_image;
145 } 146 }
146 return _arrowImage; 147 return _arrowImage;
@@ -154,21 +155,4 @@ static const NSInteger margin = 12; @@ -154,21 +155,4 @@ static const NSInteger margin = 12;
154 return _notifiSwitch; 155 return _notifiSwitch;
155 } 156 }
156 157
157 -/**  
158 - * 创建图片  
159 - *  
160 - * @param imageName 图片名字  
161 - * @param bundleName 图片所在的bundle名字  
162 - * @param targetClass 类和bundle的同级目录  
163 - * @return 返回UIImage  
164 - */  
165 -- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{  
166 - NSBundle *bundle = [NSBundle bundleForClass:targetClass];  
167 - NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];  
168 - NSBundle *targetBundle = [NSBundle bundleWithURL:url];  
169 - UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];  
170 - return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];  
171 -  
172 -}  
173 -  
174 @end 158 @end
CNLiveSettingModule/Classes/UpdateTel/CNLiveUpdateTelController.m
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
15 #import <CNLiveUserSystemSDK/CNLiveUserSystemCenter.h> 15 #import <CNLiveUserSystemSDK/CNLiveUserSystemCenter.h>
16 #import "CNUserInfoManager.h" 16 #import "CNUserInfoManager.h"
17 #import "NSString+CNLiveExtension.h" 17 #import "NSString+CNLiveExtension.h"
  18 +#import "CNLiveCategory.h"
18 19
19 #import "CNLiveSettingNavigationBar.h" 20 #import "CNLiveSettingNavigationBar.h"
20 #import "CNLiveUpdateTelView.h" 21 #import "CNLiveUpdateTelView.h"
@@ -201,22 +202,6 @@ static const NSInteger timeValue = 1.5; @@ -201,22 +202,6 @@ static const NSInteger timeValue = 1.5;
201 } 202 }
202 */ 203 */
203 204
204 -/**  
205 - * 创建图片  
206 - *  
207 - * @param imageName 图片名字  
208 - * @param bundleName 图片所在的bundle名字  
209 - * @param targetClass 类和bundle的同级目录  
210 - * @return 返回UIImage  
211 - */  
212 -- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{  
213 - NSBundle *bundle = [NSBundle bundleForClass:targetClass];  
214 - NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];  
215 - NSBundle *targetBundle = [NSBundle bundleWithURL:url];  
216 - UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];  
217 - return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];  
218 -}  
219 -  
220 #pragma mark - CNLiveSettingNavigationBarDelegate 205 #pragma mark - CNLiveSettingNavigationBarDelegate
221 - (void)navigationBar:(CNLiveSettingNavigationBar *)navigationBar actionEvents:(NSString *)actionEvents{ 206 - (void)navigationBar:(CNLiveSettingNavigationBar *)navigationBar actionEvents:(NSString *)actionEvents{
222 if ([actionEvents isEqualToString:@"1"]) { 207 if ([actionEvents isEqualToString:@"1"]) {
CNLiveSettingModule/Classes/UpdateTel/CNLiveUpdateTelView.m
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 #import <CNLiveUserSystemSDK/CNLiveUserSystemCenter.h> 14 #import <CNLiveUserSystemSDK/CNLiveUserSystemCenter.h>
15 #import "NSString+CNLiveExtension.h" 15 #import "NSString+CNLiveExtension.h"
16 #import "CNUserInfoManager.h" 16 #import "CNUserInfoManager.h"
  17 +#import "CNLiveCategory.h"
17 18
18 #define TIMECOUNT 60; 19 #define TIMECOUNT 60;
19 20
@@ -203,7 +204,7 @@ static const NSInteger timeValue = 1.5; @@ -203,7 +204,7 @@ static const NSInteger timeValue = 1.5;
203 if (!_countryImg) { 204 if (!_countryImg) {
204 _countryImg = [[UIImageView alloc] init]; 205 _countryImg = [[UIImageView alloc] init];
205 _countryImg.userInteractionEnabled = YES; 206 _countryImg.userInteractionEnabled = YES;
206 - UIImage *image = [self xw_getImageName:@"mine_info_front" bundleName:@"CNLiveSettingModule" targetClass:[self class]]; 207 + UIImage *image = [UIImage cn_getImageName:@"mine_info_front" bundleName:@"CNLiveSettingModule" targetClass:[self class]];
207 _countryImg.image = image; 208 _countryImg.image = image;
208 _countryImg.contentMode = UIViewContentModeCenter; 209 _countryImg.contentMode = UIViewContentModeCenter;
209 UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(countryTap:)]; 210 UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(countryTap:)];
@@ -314,22 +315,6 @@ static const NSInteger timeValue = 1.5; @@ -314,22 +315,6 @@ static const NSInteger timeValue = 1.5;
314 } 315 }
315 316
316 #pragma mark - 私有方法 317 #pragma mark - 私有方法
317 -/**  
318 - * 创建图片  
319 - *  
320 - * @param imageName 图片名字  
321 - * @param bundleName 图片所在的bundle名字  
322 - * @param targetClass 类和bundle的同级目录  
323 - * @return 返回UIImage  
324 - */  
325 -- (UIImage *)xw_getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{  
326 - NSBundle *bundle = [NSBundle bundleForClass:targetClass];  
327 - NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];  
328 - NSBundle *targetBundle = [NSBundle bundleWithURL:url];  
329 - UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];  
330 - return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];  
331 -  
332 -}  
333 318
334 #pragma mark - Action 319 #pragma mark - Action
335 - (void)countryTap:(UITapGestureRecognizer *)tap{ 320 - (void)countryTap:(UITapGestureRecognizer *)tap{
CNLiveSettingModule/Classes/View/CNLiveSettingCell.m
@@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
8 8
9 #import "CNLiveSettingCell.h" 9 #import "CNLiveSettingCell.h"
10 #import <Masonry/Masonry.h> 10 #import <Masonry/Masonry.h>
  11 +#import "CNLiveCategory.h"
  12 +
11 #import "CNLiveSettingModel.h" 13 #import "CNLiveSettingModel.h"
12 14
13 @interface CNLiveSettingCell() 15 @interface CNLiveSettingCell()
@@ -161,7 +163,7 @@ static const NSInteger margin = 12; @@ -161,7 +163,7 @@ static const NSInteger margin = 12;
161 - (UIImageView *)front { 163 - (UIImageView *)front {
162 if (!_front) { 164 if (!_front) {
163 _front = [[UIImageView alloc] init]; 165 _front = [[UIImageView alloc] init];
164 - UIImage *xw_image = [self xw_getImageName:@"mine_info_front" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveSettingCell class]]; 166 + UIImage *xw_image = [UIImage cn_getImageName:@"mine_info_front" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveSettingCell class]];
165 _front.image = xw_image; 167 _front.image = xw_image;
166 _front.contentMode = UIViewContentModeCenter; 168 _front.contentMode = UIViewContentModeCenter;
167 169
CNLiveSettingModule/Classes/View/CNLiveSettingNavigationBar.m
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 8
9 #import "CNLiveSettingNavigationBar.h" 9 #import "CNLiveSettingNavigationBar.h"
10 #import "QMUIKit.h" 10 #import "QMUIKit.h"
  11 +#import "CNLiveCategory.h"
11 12
12 @interface CNLiveSettingNavigationBar () 13 @interface CNLiveSettingNavigationBar ()
13 14
@@ -59,7 +60,7 @@ static const NSInteger margin = 15; @@ -59,7 +60,7 @@ static const NSInteger margin = 15;
59 _left= [UIButton buttonWithType:UIButtonTypeCustom]; 60 _left= [UIButton buttonWithType:UIButtonTypeCustom];
60 _left.adjustsImageWhenHighlighted = NO; 61 _left.adjustsImageWhenHighlighted = NO;
61 _left.frame = CGRectMake(margin, StatusBarHeight, NavigationBarHeight, NavigationBarHeight); 62 _left.frame = CGRectMake(margin, StatusBarHeight, NavigationBarHeight, NavigationBarHeight);
62 - UIImage *image = [self xw_getImageName:@"mine_back_black_b" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveSettingNavigationBar class]]; 63 + UIImage *image = [UIImage cn_getImageName:@"mine_back_black_b" bundleName:@"CNLiveSettingModule" targetClass:[CNLiveSettingNavigationBar class]];
63 [_left setImage:[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal]; 64 [_left setImage:[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
64 _left.titleLabel.font = [UIFont systemFontOfSize:15]; 65 _left.titleLabel.font = [UIFont systemFontOfSize:15];
65 [_left setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft]; 66 [_left setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];
Example/CNLiveSettingModule.xcodeproj/project.pbxproj
@@ -352,6 +352,7 @@ @@ -352,6 +352,7 @@
352 "${BUILT_PRODUCTS_DIR}/CNLiveBaseTools/CNLiveBaseTools.framework", 352 "${BUILT_PRODUCTS_DIR}/CNLiveBaseTools/CNLiveBaseTools.framework",
353 "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework", 353 "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework",
354 "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework", 354 "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework",
  355 + "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework",
355 "${BUILT_PRODUCTS_DIR}/CNLiveChooseCountry/CNLiveChooseCountry.framework", 356 "${BUILT_PRODUCTS_DIR}/CNLiveChooseCountry/CNLiveChooseCountry.framework",
356 "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", 357 "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework",
357 "${BUILT_PRODUCTS_DIR}/CNLiveCommonClass/CNLiveCommonClass.framework", 358 "${BUILT_PRODUCTS_DIR}/CNLiveCommonClass/CNLiveCommonClass.framework",
@@ -380,6 +381,7 @@ @@ -380,6 +381,7 @@
380 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseTools.framework", 381 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseTools.framework",
381 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework", 382 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework",
382 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework", 383 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework",
  384 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework",
383 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveChooseCountry.framework", 385 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveChooseCountry.framework",
384 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", 386 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework",
385 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonClass.framework", 387 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonClass.framework",