Commit 9485a65a3bc0162a606a5d5f5e3006a3eb865a7a

Authored by zhangxiaowen
1 parent 5b43147f

no message

CNLiveScioLive/AppDelegate.m
... ... @@ -31,9 +31,6 @@
31 31 //推送
32 32 [self registerRemoteNotification];
33 33 [self registerNotification:launchOptions];
34   -
35   - //版本更新
36   - [self checkAppUpdate];
37 34  
38 35 //收藏
39 36 [[DBAction sharedDBAction] createTable];
... ... @@ -45,7 +42,10 @@
45 42  
46 43 //语言
47 44 [self setApplicationLanguage];
48   -
  45 +
  46 + //版本更新
  47 + [self checkAppUpdate];
  48 +
49 49 [self initializeSDKConfiguration];
50 50  
51 51 if(IS_CHINESE){
... ... @@ -478,11 +478,11 @@
478 478 NSString *newVersion =[results objectForKey:@"version"];
479 479 if([newVersion compare:nowVersion options:NSNumericSearch] == NSOrderedDescending) {
480 480 [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"upDate"];
481   - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"版本更新"
  481 + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:CustomStr(@"VersionUpdate")
482 482 message:[results objectForKey:@"releaseNotes"]
483 483 delegate:self
484   - cancelButtonTitle:@"取消"
485   - otherButtonTitles:@"更新",nil];
  484 + cancelButtonTitle:CustomStr(@"Cancel")
  485 + otherButtonTitles:CustomStr(@"Update"),nil];
486 486 [alert show];
487 487 return;
488 488 }
... ...
CNLiveScioLive/Pages/Home/CNHomeBaseViewController.m
... ... @@ -126,7 +126,6 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
126 126 }
127 127 #pragma mark - UITableViewDelegate
128 128 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
129   -
130 129 CNHomeModel *model = self.data[indexPath.row];
131 130 if([model.showType isEqualToString:@"0"]){
132 131 return 200*MainHScale+85;//一张图 上边
... ... @@ -136,7 +135,8 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
136 135 if(model.img && ![model.img isEqualToString:@""]){
137 136 return 80*MainScale+20;//一张图 左边
138 137 }
139   - return 80;//无图
  138 +// return 80;//无图
  139 + return model.titleHeight+40;//无图
140 140 }
141 141 else if([model.showType isEqualToString:@"2"]){
142 142 return (MainScreenWidth-20-20)/3.0+85;//三张图
... ... @@ -146,11 +146,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
146 146 if(model.img && ![model.img isEqualToString:@""]){
147 147 return 80*MainScale+20;//一张图 左边
148 148 }
149   - return 80;//无图
150   -
  149 +// return 80;//无图
  150 + return model.titleHeight+40;//无图
  151 +
151 152 }else{
152   - return 80;//无图
153   -
  153 +// return 80;//无图
  154 + return model.titleHeight+40;//无图
  155 +
154 156 }
155 157 }
156 158  
... ...
CNLiveScioLive/Pages/Home/CNHomeENViewController.m
... ... @@ -144,7 +144,8 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
144 144 if(model.img && ![model.img isEqualToString:@""]){
145 145 return 80*MainScale+20;//一张图 左边
146 146 }
147   - return 80;//无图
  147 +// return 80;//无图
  148 + return model.titleHeight+40;//无图
148 149 }
149 150 else if([model.showType isEqualToString:@"2"]){
150 151 return (MainScreenWidth-20-20)/3.0+85;//三张图
... ... @@ -154,10 +155,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
154 155 if(model.img && ![model.img isEqualToString:@""]){
155 156 return 80*MainScale+20;//一张图 左边
156 157 }
157   - return 80;//无图
  158 +// return 80;//无图
  159 + return model.titleHeight+40;//无图
158 160  
159 161 }else{
160   - return 80;//无图
  162 +// return 80;//无图
  163 + return model.titleHeight+40;//无图
161 164  
162 165 }
163 166 }
... ...
CNLiveScioLive/Pages/Home/CNHomeModel.h
... ... @@ -49,4 +49,7 @@
49 49 @property (nonatomic, copy) NSString *playType;
50 50  
51 51 @property (nonatomic, copy) NSString *gxbArticleId;
  52 +
  53 +@property (nonatomic, assign) CGFloat titleHeight;
  54 +
52 55 @end
... ...
CNLiveScioLive/Pages/Home/CNHomeModel.m
... ... @@ -9,5 +9,15 @@
9 9 #import "CNHomeModel.h"
10 10  
11 11 @implementation CNHomeModel
  12 +static NSInteger const margin = 10;
12 13  
  14 +- (CGFloat)titleHeight{
  15 +
  16 + NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading;
  17 +
  18 + CGRect titleRect = [_title boundingRectWithSize:CGSizeMake(MainScreenWidth - 4*margin,MAXFLOAT) options:options attributes:@{NSFontAttributeName:Font(16)} context:nil];
  19 +
  20 + return titleRect.size.height;
  21 +
  22 +}
13 23 @end
... ...
CNLiveScioLive/Pages/Home/外宣要闻/Controller/CNLiveHeraldedNewsViewController.m
... ... @@ -169,7 +169,8 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
169 169 if(model.img && ![model.img isEqualToString:@""]){
170 170 return 80*MainScale+20;//一张图 左边
171 171 }
172   - return 80;//无图
  172 +// return 80;//无图
  173 + return model.titleHeight+40;//无图
173 174 }
174 175 else if([model.showType isEqualToString:@"2"]){
175 176 // return 210*MainScale;//三张图
... ... @@ -180,10 +181,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
180 181 if(model.img && ![model.img isEqualToString:@""]){
181 182 return 80*MainScale+20;//一张图 左边
182 183 }
183   - return 80;//无图
  184 +// return 80;//无图
  185 + return model.titleHeight+40;//无图
184 186  
185 187 }else{
186   - return 80;//无图
  188 +// return 80;//无图
  189 + return model.titleHeight+40;//无图
187 190  
188 191 }
189 192 }
... ...
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsNoPicTableViewCell.m
... ... @@ -88,7 +88,7 @@
88 88 make.left.equalTo(self->_backgroundImage.mas_left).with.offset(10);
89 89 make.top.equalTo(self->_backgroundImage.mas_top).with.offset(5);
90 90 make.right.equalTo(self->_backgroundImage.mas_right).with.offset(-10);
91   - make.height.offset(40);
  91 +// make.height.offset(self->_model.titleHeight);
92 92  
93 93 }];
94 94  
... ...
CNLiveScioLive/Pages/Home/答记者问/Controller/CNLiveReporterAskedViewController.m
... ... @@ -140,7 +140,8 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
140 140 if(model.img && ![model.img isEqualToString:@""]){
141 141 return 80*MainScale+20;//一张图 左边
142 142 }
143   - return 80;//无图
  143 +// return 80;//无图
  144 + return model.titleHeight+40;//无图
144 145 }
145 146 else if([model.showType isEqualToString:@"2"]){
146 147 return (MainScreenWidth-20-20)/3.0+85;//三张图
... ... @@ -150,10 +151,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
150 151 if(model.img && ![model.img isEqualToString:@""]){
151 152 return 80*MainScale+20;//一张图 左边
152 153 }
153   - return 80;//无图
  154 +// return 80;//无图
  155 + return model.titleHeight+40;//无图
154 156  
155 157 }else{
156   - return 80;//无图
  158 +// return 80;//无图
  159 + return model.titleHeight+40;//无图
157 160  
158 161 }
159 162 }
... ...
CNLiveScioLive/Pages/My/通知公告/Controller/CNMyAnnouncementsViewController.m
... ... @@ -156,7 +156,8 @@ static NSString *myAnnouncementsTableViewCell = @"CNMyAnnouncementsTableViewCell
156 156 */
157 157 #pragma mark - UITableViewDelegate
158 158 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
159   - return 80;
  159 + CNMyAnnouncementsModel *model = self.data[indexPath.row];
  160 + return model.titleHeight+40;
160 161  
161 162 }
162 163  
... ...
CNLiveScioLive/Pages/My/通知公告/Model/CNMyAnnouncementsModel.h
... ... @@ -69,4 +69,6 @@
69 69 @property (nonatomic, copy) NSString *videoUrl;
70 70 @property (nonatomic, copy) NSString *vipFlag;
71 71  
  72 +@property (nonatomic, assign) CGFloat titleHeight;
  73 +
72 74 @end
... ...
CNLiveScioLive/Pages/My/通知公告/Model/CNMyAnnouncementsModel.m
... ... @@ -9,5 +9,15 @@
9 9 #import "CNMyAnnouncementsModel.h"
10 10  
11 11 @implementation CNMyAnnouncementsModel
  12 +static NSInteger const margin = 10;
12 13  
  14 +- (CGFloat)titleHeight{
  15 +
  16 + NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading;
  17 +
  18 + CGRect titleRect = [_title boundingRectWithSize:CGSizeMake(MainScreenWidth - 2*margin,MAXFLOAT) options:options attributes:@{NSFontAttributeName:Font(15)} context:nil];
  19 +
  20 + return titleRect.size.height;
  21 +
  22 +}
13 23 @end
... ...
CNLiveScioLive/Pages/My/通知公告/View/CNMyAnnouncementsTableViewCell.m
... ... @@ -26,7 +26,7 @@ static NSInteger margin = 10;
26 26 self.contentView.backgroundColor = [UIColor whiteColor];
27 27  
28 28 _titleLabel = [[UILabel alloc] init];
29   - _titleLabel.numberOfLines = 2;
  29 + _titleLabel.numberOfLines = 0;
30 30 _titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
31 31 _titleLabel.textColor = HEXCOLOR(0x333333);
32 32 _titleLabel.font = [UIFont systemFontOfSize:15];
... ...
CNLiveScioLive/Pages/Sources/en.lproj/Localizable.strings
... ... @@ -20,6 +20,8 @@
20 20 "Reset" = "Reset";
21 21 "Unlimited" = "Unlimited";
22 22 "Clear" = "Clear";
  23 +"VersionUpdate" = "Version Update";
  24 +"Update" = "Update";
23 25  
24 26 //NEWS
25 27 "NEWS" = "NEWS";
... ...
CNLiveScioLive/Pages/Sources/zh-Hans.lproj/Localizable.strings
... ... @@ -20,6 +20,8 @@
20 20 "Reset" = "重置";
21 21 "Unlimited" = "不限制";
22 22 "Clear" = "清空";
  23 +"VersionUpdate" = "版本更新";
  24 +"Update" = "更新";
23 25  
24 26 //NEWS
25 27 "NEWS" = "新闻";
... ...