Commit 265779803d8c608717805c8eb9b0deb852379f1f

Authored by zhangxiaowen
1 parent c3130f9e

no message

CNLiveScioLive/Pages/Home/CNHomeBaseViewController.m
@@ -135,8 +135,9 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -135,8 +135,9 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
135 if(model.img && ![model.img isEqualToString:@""]){ 135 if(model.img && ![model.img isEqualToString:@""]){
136 return 80*MainScale+20;//一张图 左边 136 return 80*MainScale+20;//一张图 左边
137 } 137 }
138 -// return 80;//无图  
139 - return model.titleHeight+40;//无图 138 +// return model.titleHeight+40;//无图
  139 + return 80*MainScale+20;//一张图 左边
  140 +
140 } 141 }
141 else if([model.showType isEqualToString:@"2"]){ 142 else if([model.showType isEqualToString:@"2"]){
142 return (MainScreenWidth-20-20)/3.0+85;//三张图 143 return (MainScreenWidth-20-20)/3.0+85;//三张图
@@ -146,12 +147,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -146,12 +147,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
146 if(model.img && ![model.img isEqualToString:@""]){ 147 if(model.img && ![model.img isEqualToString:@""]){
147 return 80*MainScale+20;//一张图 左边 148 return 80*MainScale+20;//一张图 左边
148 } 149 }
149 -// return 80;//无图  
150 - return model.titleHeight+40;//无图 150 +// return model.titleHeight+40;//无图
  151 + return 80*MainScale+20;//一张图 左边
151 152
152 }else{ 153 }else{
153 -// return 80;//无图  
154 - return model.titleHeight+40;//无图 154 +// return model.titleHeight+40;//无图
  155 + return 80*MainScale+20;//一张图 左边
155 156
156 } 157 }
157 } 158 }
@@ -187,9 +188,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -187,9 +188,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
187 return cell; 188 return cell;
188 } 189 }
189 //无图 190 //无图
190 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 191 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  192 +// if (!cell) {
  193 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  194 +// }
  195 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
191 if (!cell) { 196 if (!cell) {
192 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 197 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
193 } 198 }
194 cell.selectionStyle = UITableViewCellSelectionStyleNone; 199 cell.selectionStyle = UITableViewCellSelectionStyleNone;
195 cell.model = self.data[indexPath.row]; 200 cell.model = self.data[indexPath.row];
@@ -218,9 +223,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -218,9 +223,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
218 return cell; 223 return cell;
219 } 224 }
220 //无图 225 //无图
221 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 226 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  227 +// if (!cell) {
  228 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  229 +// }
  230 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
222 if (!cell) { 231 if (!cell) {
223 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 232 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
224 } 233 }
225 cell.selectionStyle = UITableViewCellSelectionStyleNone; 234 cell.selectionStyle = UITableViewCellSelectionStyleNone;
226 cell.model = self.data[indexPath.row]; 235 cell.model = self.data[indexPath.row];
@@ -228,9 +237,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -228,9 +237,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
228 237
229 }else{ 238 }else{
230 //无图 239 //无图
231 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 240 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  241 +// if (!cell) {
  242 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  243 +// }
  244 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
232 if (!cell) { 245 if (!cell) {
233 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 246 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
234 } 247 }
235 cell.selectionStyle = UITableViewCellSelectionStyleNone; 248 cell.selectionStyle = UITableViewCellSelectionStyleNone;
236 cell.model = self.data[indexPath.row]; 249 cell.model = self.data[indexPath.row];
CNLiveScioLive/Pages/Home/CNHomeENViewController.m
@@ -144,8 +144,9 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -144,8 +144,9 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
144 if(model.img && ![model.img isEqualToString:@""]){ 144 if(model.img && ![model.img isEqualToString:@""]){
145 return 80*MainScale+20;//一张图 左边 145 return 80*MainScale+20;//一张图 左边
146 } 146 }
147 -// return 80;//无图  
148 - return model.titleHeight+40;//无图 147 +// return model.titleHeight+40;//无图
  148 + return 80*MainScale+20;//一张图 左边
  149 +
149 } 150 }
150 else if([model.showType isEqualToString:@"2"]){ 151 else if([model.showType isEqualToString:@"2"]){
151 return (MainScreenWidth-20-20)/3.0+85;//三张图 152 return (MainScreenWidth-20-20)/3.0+85;//三张图
@@ -155,12 +156,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -155,12 +156,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
155 if(model.img && ![model.img isEqualToString:@""]){ 156 if(model.img && ![model.img isEqualToString:@""]){
156 return 80*MainScale+20;//一张图 左边 157 return 80*MainScale+20;//一张图 左边
157 } 158 }
158 -// return 80;//无图  
159 - return model.titleHeight+40;//无图 159 +// return model.titleHeight+40;//无图
  160 + return 80*MainScale+20;//一张图 左边
160 161
161 }else{ 162 }else{
162 -// return 80;//无图  
163 - return model.titleHeight+40;//无图 163 +// return model.titleHeight+40;//无图
  164 + return 80*MainScale+20;//一张图 左边
164 165
165 } 166 }
166 } 167 }
@@ -196,9 +197,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -196,9 +197,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
196 return cell; 197 return cell;
197 } 198 }
198 //无图 199 //无图
199 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 200 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  201 +// if (!cell) {
  202 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  203 +// }
  204 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
200 if (!cell) { 205 if (!cell) {
201 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 206 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
202 } 207 }
203 cell.selectionStyle = UITableViewCellSelectionStyleNone; 208 cell.selectionStyle = UITableViewCellSelectionStyleNone;
204 cell.model = self.data[indexPath.row]; 209 cell.model = self.data[indexPath.row];
@@ -227,9 +232,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -227,9 +232,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
227 return cell; 232 return cell;
228 } 233 }
229 //无图 234 //无图
230 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 235 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  236 +// if (!cell) {
  237 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  238 +// }
  239 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
231 if (!cell) { 240 if (!cell) {
232 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 241 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
233 } 242 }
234 cell.selectionStyle = UITableViewCellSelectionStyleNone; 243 cell.selectionStyle = UITableViewCellSelectionStyleNone;
235 cell.model = self.data[indexPath.row]; 244 cell.model = self.data[indexPath.row];
@@ -237,9 +246,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -237,9 +246,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
237 246
238 }else{ 247 }else{
239 //无图 248 //无图
240 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 249 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  250 +// if (!cell) {
  251 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  252 +// }
  253 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
241 if (!cell) { 254 if (!cell) {
242 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 255 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
243 } 256 }
244 cell.selectionStyle = UITableViewCellSelectionStyleNone; 257 cell.selectionStyle = UITableViewCellSelectionStyleNone;
245 cell.model = self.data[indexPath.row]; 258 cell.model = self.data[indexPath.row];
CNLiveScioLive/Pages/Home/外宣要闻/Controller/CNLiveHeraldedNewsViewController.m
@@ -169,8 +169,9 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -169,8 +169,9 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
169 if(model.img && ![model.img isEqualToString:@""]){ 169 if(model.img && ![model.img isEqualToString:@""]){
170 return 80*MainScale+20;//一张图 左边 170 return 80*MainScale+20;//一张图 左边
171 } 171 }
172 -// return 80;//无图  
173 - return model.titleHeight+40;//无图 172 +// return model.titleHeight+40;//无图
  173 + return 80*MainScale+20;//一张图 左边
  174 +
174 } 175 }
175 else if([model.showType isEqualToString:@"2"]){ 176 else if([model.showType isEqualToString:@"2"]){
176 // return 210*MainScale;//三张图 177 // return 210*MainScale;//三张图
@@ -181,12 +182,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -181,12 +182,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
181 if(model.img && ![model.img isEqualToString:@""]){ 182 if(model.img && ![model.img isEqualToString:@""]){
182 return 80*MainScale+20;//一张图 左边 183 return 80*MainScale+20;//一张图 左边
183 } 184 }
184 -// return 80;//无图  
185 - return model.titleHeight+40;//无图 185 +// return model.titleHeight+40;//无图
  186 + return 80*MainScale+20;//一张图 左边
  187 +
186 188
187 }else{ 189 }else{
188 -// return 80;//无图  
189 - return model.titleHeight+40;//无图 190 +// return model.titleHeight+40;//无图
  191 + return 80*MainScale+20;//一张图 左边
190 192
191 } 193 }
192 } 194 }
@@ -222,9 +224,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -222,9 +224,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
222 return cell; 224 return cell;
223 } 225 }
224 //无图 226 //无图
225 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 227 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  228 +// if (!cell) {
  229 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  230 +// }
  231 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
226 if (!cell) { 232 if (!cell) {
227 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 233 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
228 } 234 }
229 cell.selectionStyle = UITableViewCellSelectionStyleNone; 235 cell.selectionStyle = UITableViewCellSelectionStyleNone;
230 cell.model = self.data[indexPath.row]; 236 cell.model = self.data[indexPath.row];
@@ -253,9 +259,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -253,9 +259,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
253 return cell; 259 return cell;
254 } 260 }
255 //无图 261 //无图
256 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 262 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  263 +// if (!cell) {
  264 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  265 +// }
  266 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
257 if (!cell) { 267 if (!cell) {
258 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 268 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
259 } 269 }
260 cell.selectionStyle = UITableViewCellSelectionStyleNone; 270 cell.selectionStyle = UITableViewCellSelectionStyleNone;
261 cell.model = self.data[indexPath.row]; 271 cell.model = self.data[indexPath.row];
@@ -263,9 +273,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -263,9 +273,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
263 273
264 }else{ 274 }else{
265 //无图 275 //无图
266 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 276 +// CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  277 +// if (!cell) {
  278 +// cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  279 +// }
  280 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
267 if (!cell) { 281 if (!cell) {
268 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 282 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
269 } 283 }
270 cell.selectionStyle = UITableViewCellSelectionStyleNone; 284 cell.selectionStyle = UITableViewCellSelectionStyleNone;
271 cell.model = self.data[indexPath.row]; 285 cell.model = self.data[indexPath.row];
CNLiveScioLive/Pages/Home/答记者问/Controller/CNLiveReporterAskedViewController.m
@@ -140,8 +140,9 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -140,8 +140,9 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
140 if(model.img && ![model.img isEqualToString:@""]){ 140 if(model.img && ![model.img isEqualToString:@""]){
141 return 80*MainScale+20;//一张图 左边 141 return 80*MainScale+20;//一张图 左边
142 } 142 }
143 -// return 80;//无图  
144 - return model.titleHeight+40;//无图 143 +// return model.titleHeight+40;//无图
  144 + return 80*MainScale+20;//一张图 左边
  145 +
145 } 146 }
146 else if([model.showType isEqualToString:@"2"]){ 147 else if([model.showType isEqualToString:@"2"]){
147 return (MainScreenWidth-20-20)/3.0+85;//三张图 148 return (MainScreenWidth-20-20)/3.0+85;//三张图
@@ -151,12 +152,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -151,12 +152,12 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
151 if(model.img && ![model.img isEqualToString:@""]){ 152 if(model.img && ![model.img isEqualToString:@""]){
152 return 80*MainScale+20;//一张图 左边 153 return 80*MainScale+20;//一张图 左边
153 } 154 }
154 -// return 80;//无图  
155 - return model.titleHeight+40;//无图 155 +// return model.titleHeight+40;//无图
  156 + return 80*MainScale+20;//一张图 左边
156 157
157 }else{ 158 }else{
158 -// return 80;//无图  
159 - return model.titleHeight+40;//无图 159 +// return model.titleHeight+40;//无图
  160 + return 80*MainScale+20;//一张图 左边
160 161
161 } 162 }
162 } 163 }
@@ -192,9 +193,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -192,9 +193,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
192 return cell; 193 return cell;
193 } 194 }
194 //无图 195 //无图
195 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 196 + // CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  197 + // if (!cell) {
  198 + // cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  199 + // }
  200 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
196 if (!cell) { 201 if (!cell) {
197 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 202 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
198 } 203 }
199 cell.selectionStyle = UITableViewCellSelectionStyleNone; 204 cell.selectionStyle = UITableViewCellSelectionStyleNone;
200 cell.model = self.data[indexPath.row]; 205 cell.model = self.data[indexPath.row];
@@ -223,9 +228,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -223,9 +228,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
223 return cell; 228 return cell;
224 } 229 }
225 //无图 230 //无图
226 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 231 + // CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  232 + // if (!cell) {
  233 + // cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  234 + // }
  235 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
227 if (!cell) { 236 if (!cell) {
228 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 237 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
229 } 238 }
230 cell.selectionStyle = UITableViewCellSelectionStyleNone; 239 cell.selectionStyle = UITableViewCellSelectionStyleNone;
231 cell.model = self.data[indexPath.row]; 240 cell.model = self.data[indexPath.row];
@@ -233,9 +242,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -233,9 +242,13 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
233 242
234 }else{ 243 }else{
235 //无图 244 //无图
236 - CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell]; 245 + // CNLiveNewsNoPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsNoPicTableViewCell];
  246 + // if (!cell) {
  247 + // cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell];
  248 + // }
  249 + CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell];
237 if (!cell) { 250 if (!cell) {
238 - cell = [[CNLiveNewsNoPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsNoPicTableViewCell]; 251 + cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell];
239 } 252 }
240 cell.selectionStyle = UITableViewCellSelectionStyleNone; 253 cell.selectionStyle = UITableViewCellSelectionStyleNone;
241 cell.model = self.data[indexPath.row]; 254 cell.model = self.data[indexPath.row];
@@ -243,6 +256,7 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -243,6 +256,7 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
243 256
244 } 257 }
245 258
  259 +
246 } 260 }
247 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 261 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
248 CNHomeModel *model = self.data[indexPath.row]; 262 CNHomeModel *model = self.data[indexPath.row];
CNLiveScioLive/Pages/Live/Controller/GraphicLiveViewController.m
@@ -247,8 +247,32 @@ @@ -247,8 +247,32 @@
247 } 247 }
248 return YES; 248 return YES;
249 } 249 }
  250 +
250 - (void)webViewDidFinishLoad:(UIWebView *)webView{ 251 - (void)webViewDidFinishLoad:(UIWebView *)webView{
251 - if (1000 == webView.tag) { 252 +
  253 + if (![[Reachability reachabilityForInternetConnection] currentReachabilityStatus]) {
  254 + [AlertViewTool showHUDViewText:CustomStr(@"NetworkiInterruption")];
  255 + [self setUpUIWithTag:webView.tag Height:0];
  256 + return;
  257 + }
  258 + AFHTTPSessionManager *manager =[AFHTTPSessionManager manager];
  259 + manager.responseSerializer = [AFHTTPResponseSerializer serializer];
  260 + [manager POST:@"http://s.scio.gov.cn/ocms/.content/function_provider/arswitch.json" parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
  261 + NSString *result = [[NSString alloc]initWithData:responseObject encoding:NSUTF8StringEncoding];
  262 + NSLog(@"%@",result);
  263 + [self setUpUIWithTag:webView.tag Height:[result isEqualToString:@"\n\n 0"]?40.0:0.0];
  264 +
  265 +
  266 + } failure:^(NSURLSessionDataTask *task, NSError *error) {
  267 + NSLog(@"%@",error);
  268 + [self setUpUIWithTag:webView.tag Height:0];
  269 +
  270 + }];
  271 +
  272 +}
  273 +- (void)setUpUIWithTag:(NSInteger)tag Height:(NSInteger)height{
  274 +
  275 + if (1000 == tag) {
252 CGRect frame = relatedWebView.frame; 276 CGRect frame = relatedWebView.frame;
253 frame.size.width = MainScreenWidth; 277 frame.size.width = MainScreenWidth;
254 frame.size.height = 1; 278 frame.size.height = 1;
@@ -258,13 +282,13 @@ @@ -258,13 +282,13 @@
258 lineImage1 = [[UIImageView alloc] initWithFrame:CGRectMake(0, descriptionHeight, MainScreenWidth, 1)]; 282 lineImage1 = [[UIImageView alloc] initWithFrame:CGRectMake(0, descriptionHeight, MainScreenWidth, 1)];
259 lineImage1.backgroundColor = Color_Line; 283 lineImage1.backgroundColor = Color_Line;
260 [backgroundView addSubview:lineImage1]; 284 [backgroundView addSubview:lineImage1];
261 - 285 +
262 upDownButton = [UIButton buttonWithType:UIButtonTypeCustom]; 286 upDownButton = [UIButton buttonWithType:UIButtonTypeCustom];
263 [upDownButton addTarget:self action:@selector(showGraphicLive:) forControlEvents:UIControlEventTouchUpInside]; 287 [upDownButton addTarget:self action:@selector(showGraphicLive:) forControlEvents:UIControlEventTouchUpInside];
264 - [upDownButton setFrame:CGRectMake(0, descriptionHeight, MainScreenWidth, 40)]; 288 + [upDownButton setFrame:CGRectMake(0, descriptionHeight, MainScreenWidth, height)];
265 [backgroundView addSubview:upDownButton]; 289 [backgroundView addSubview:upDownButton];
266 290
267 - UILabel *graphicLive = [[UILabel alloc] initWithFrame:CGRectMake(20, descriptionHeight, MainScreenWidth/2, 40)]; 291 + UILabel *graphicLive = [[UILabel alloc] initWithFrame:CGRectMake(20, descriptionHeight, MainScreenWidth/2, height)];
268 graphicLive.font = [UIFont systemFontOfSize:13]; 292 graphicLive.font = [UIFont systemFontOfSize:13];
269 graphicLive.backgroundColor = [UIColor clearColor]; 293 graphicLive.backgroundColor = [UIColor clearColor];
270 graphicLive.textColor = HEXCOLOR(0x184085); 294 graphicLive.textColor = HEXCOLOR(0x184085);
@@ -273,14 +297,15 @@ @@ -273,14 +297,15 @@
273 297
274 upDownImage = [[UIImageView alloc] initWithFrame:CGRectMake(MainScreenWidth - 31, descriptionHeight + 16, 13, 7)]; 298 upDownImage = [[UIImageView alloc] initWithFrame:CGRectMake(MainScreenWidth - 31, descriptionHeight + 16, 13, 7)];
275 upDownImage.image = [UIImage imageNamed:@"cnlive_button_down"]; 299 upDownImage.image = [UIImage imageNamed:@"cnlive_button_down"];
  300 + upDownImage.hidden = height != 40;
276 [backgroundView addSubview:upDownImage]; 301 [backgroundView addSubview:upDownImage];
277 302
278 - lineImage2 = [[UIImageView alloc] initWithFrame:CGRectMake(0, 40 + descriptionHeight, MainScreenWidth, 1)]; 303 + lineImage2 = [[UIImageView alloc] initWithFrame:CGRectMake(0, height + descriptionHeight, MainScreenWidth, 1)];
279 lineImage2.backgroundColor = Color_Line; 304 lineImage2.backgroundColor = Color_Line;
280 [backgroundView addSubview:lineImage2]; 305 [backgroundView addSubview:lineImage2];
281 -  
282 - [backgroundView setContentSize:CGSizeMake(MainScreenWidth, 40 + descriptionHeight + 960)];  
283 - 306 +
  307 + [backgroundView setContentSize:CGSizeMake(MainScreenWidth, height + descriptionHeight + 960)];
  308 +
284 _webView = [[UIWebView alloc] initWithFrame:CGRectZero]; 309 _webView = [[UIWebView alloc] initWithFrame:CGRectZero];
285 _webView.scrollView.backgroundColor = [UIColor clearColor]; 310 _webView.scrollView.backgroundColor = [UIColor clearColor];
286 _webView.dataDetectorTypes = UIDataDetectorTypeNone; 311 _webView.dataDetectorTypes = UIDataDetectorTypeNone;
@@ -292,12 +317,13 @@ @@ -292,12 +317,13 @@
292 _webView.tag = 2000; 317 _webView.tag = 2000;
293 318
294 [backgroundView addSubview:_webView]; 319 [backgroundView addSubview:_webView];
295 -  
296 - relatedInformationView = [[UIView alloc] initWithFrame:CGRectMake(0, 40 + descriptionHeight, MainScreenWidth, 960)]; 320 +
  321 + relatedInformationView = [[UIView alloc] initWithFrame:CGRectMake(0, height + descriptionHeight, MainScreenWidth, 960)];
297 [backgroundView addSubview:relatedInformationView]; 322 [backgroundView addSubview:relatedInformationView];
298 323
299 - [self showRelatedInformation:40 + descriptionHeight];  
300 - } else if (2000 == webView.tag) { 324 + [self showRelatedInformation:height + descriptionHeight];
  325 +
  326 + } else if (2000 == tag) {
301 CGFloat width = MainScreenWidth - 20; 327 CGFloat width = MainScreenWidth - 20;
302 NSString *string = [NSString stringWithFormat: 328 NSString *string = [NSString stringWithFormat:
303 @"var script = document.createElement('script');" 329 @"var script = document.createElement('script');"
@@ -315,8 +341,8 @@ @@ -315,8 +341,8 @@
315 "}" 341 "}"
316 "}\";" 342 "}\";"
317 "document.getElementsByTagName('head')[0].appendChild(script);",width]; 343 "document.getElementsByTagName('head')[0].appendChild(script);",width];
318 - [webView stringByEvaluatingJavaScriptFromString:string];  
319 - [webView stringByEvaluatingJavaScriptFromString:@"ResizeImages();"]; 344 + [_webView stringByEvaluatingJavaScriptFromString:string];
  345 + [_webView stringByEvaluatingJavaScriptFromString:@"ResizeImages();"];
320 346
321 CGRect frame = _webView.frame; 347 CGRect frame = _webView.frame;
322 frame.size.width = MainScreenWidth; 348 frame.size.width = MainScreenWidth;
@@ -329,7 +355,7 @@ @@ -329,7 +355,7 @@
329 if (0 == [heightArr[fontIndex] floatValue]) { 355 if (0 == [heightArr[fontIndex] floatValue]) {
330 [heightArr replaceObjectAtIndex:fontIndex withObject:[NSString stringWithFormat:@"%f",graphicLiveHeight]]; 356 [heightArr replaceObjectAtIndex:fontIndex withObject:[NSString stringWithFormat:@"%f",graphicLiveHeight]];
331 } 357 }
332 - 358 +
333 if (isShow) { 359 if (isShow) {
334 NSLog(@"fontIndex = %d",fontIndex); 360 NSLog(@"fontIndex = %d",fontIndex);
335 [backgroundView setContentSize:CGSizeMake(MainScreenWidth, 40 + descriptionHeight + [heightArr[fontIndex] floatValue] + 221)]; 361 [backgroundView setContentSize:CGSizeMake(MainScreenWidth, 40 + descriptionHeight + [heightArr[fontIndex] floatValue] + 221)];
CNLiveScioLive/Pages/My/CNMyViewController.m
@@ -19,6 +19,8 @@ @@ -19,6 +19,8 @@
19 19
20 @interface CNMyViewController ()<UITableViewDelegate,UITableViewDataSource> 20 @interface CNMyViewController ()<UITableViewDelegate,UITableViewDataSource>
21 @property (nonatomic, strong) UITableView *tableView; 21 @property (nonatomic, strong) UITableView *tableView;
  22 +@property (nonatomic, strong) NSArray *titles;
  23 +@property (nonatomic, strong) NSArray *pics;
22 24
23 @end 25 @end
24 26
@@ -63,35 +65,28 @@ static NSString *identifier = @&quot;CNMyTableViewCell&quot;; @@ -63,35 +65,28 @@ static NSString *identifier = @&quot;CNMyTableViewCell&quot;;
63 65
64 #pragma mark - UITableViewDataSource 66 #pragma mark - UITableViewDataSource
65 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 67 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
66 - return 3; 68 + return self.titles.count;
67 69
68 } 70 }
69 71
70 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 72 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
71 - if(section == 0){  
72 - return 2; 73 + NSArray *data = self.titles[section];
  74 + return data.count;
73 75
74 - }else if (section == 1){  
75 - return 2;  
76 -  
77 - }  
78 - return 1;  
79 -  
80 } 76 }
81 77
82 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 78 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
83 -// NSArray *name = @[@[@"通知公告", @"我的收藏"],@[@"证件申领", @"联系我们"],@[@"设置"]];  
84 - NSArray *name = @[@[CustomStr(@"Announcements"), CustomStr(@"MyFavorite")],@[CustomStr(@"Certificates"), CustomStr(@"ContactUs")],@[CustomStr(@"Settings")]];  
85 - NSArray *pic = @[@[@"cnlive_my_news", @"cnlive_my_collection"],@[@"cnlive_my_certificate", @"cnlive_my_tel"],@[@"cnlive_my_setting"]]; 79 +
  80 +// NSArray *name = @[@[CustomStr(@"Announcements"), CustomStr(@"MyFavorite")],@[CustomStr(@"ContactUs")],@[CustomStr(@"Settings")]];
  81 +// NSArray *pic = @[@[@"cnlive_my_news", @"cnlive_my_collection"],@[@"cnlive_my_tel"],@[@"cnlive_my_setting"]];
86 82
87 CNMyTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; 83 CNMyTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
88 if (!cell) { 84 if (!cell) {
89 cell = [[CNMyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; 85 cell = [[CNMyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
90 } 86 }
91 cell.selectionStyle = UITableViewCellSelectionStyleNone; 87 cell.selectionStyle = UITableViewCellSelectionStyleNone;
92 - cell.name = name[indexPath.section][indexPath.row];  
93 - cell.pic = pic  
94 - [indexPath.section][indexPath.row]; 88 + cell.name = self.titles[indexPath.section][indexPath.row];
  89 + cell.pic = self.pics[indexPath.section][indexPath.row];
95 90
96 return cell; 91 return cell;
97 92
@@ -134,20 +129,25 @@ static NSString *identifier = @&quot;CNMyTableViewCell&quot;; @@ -134,20 +129,25 @@ static NSString *identifier = @&quot;CNMyTableViewCell&quot;;
134 // CNLiveCertificatesViewController *vc = [CNLiveCertificatesViewController new]; 129 // CNLiveCertificatesViewController *vc = [CNLiveCertificatesViewController new];
135 // vc.hidesBottomBarWhenPushed = YES; 130 // vc.hidesBottomBarWhenPushed = YES;
136 // [self.navigationController pushViewController:vc animated:YES]; 131 // [self.navigationController pushViewController:vc animated:YES];
137 - CNLiveWebViewController *vc = [CNLiveWebViewController new];  
138 - vc.navTitle = CustomStr(@"Certificates");  
139 - vc.url = @"http://219.142.85.77/index.html";  
140 - vc.navTitle = CustomStr(@"Certificates"); 132 +// CNLiveWebViewController *vc = [CNLiveWebViewController new];
  133 +// vc.navTitle = CustomStr(@"Certificates");
  134 +// vc.url = @"http://219.142.85.77/index.html";
  135 +// vc.navTitle = CustomStr(@"Certificates");
  136 +// vc.hidesBottomBarWhenPushed = YES;
  137 +// [self.navigationController pushViewController:vc animated:YES];
  138 +
  139 + CNLiveContactUsViewController *vc = [CNLiveContactUsViewController new];
  140 + vc.navTitle = CustomStr(@"ContactUs");
141 vc.hidesBottomBarWhenPushed = YES; 141 vc.hidesBottomBarWhenPushed = YES;
142 [self.navigationController pushViewController:vc animated:YES]; 142 [self.navigationController pushViewController:vc animated:YES];
143 143
144 144
145 }else if (indexPath.row == 1){ 145 }else if (indexPath.row == 1){
146 //联系我们 146 //联系我们
147 - CNLiveContactUsViewController *vc = [CNLiveContactUsViewController new];  
148 - vc.navTitle = CustomStr(@"ContactUs");  
149 - vc.hidesBottomBarWhenPushed = YES;  
150 - [self.navigationController pushViewController:vc animated:YES]; 147 +// CNLiveContactUsViewController *vc = [CNLiveContactUsViewController new];
  148 +// vc.navTitle = CustomStr(@"ContactUs");
  149 +// vc.hidesBottomBarWhenPushed = YES;
  150 +// [self.navigationController pushViewController:vc animated:YES];
151 151
152 } 152 }
153 return; 153 return;
@@ -211,4 +211,24 @@ static NSString *identifier = @&quot;CNMyTableViewCell&quot;; @@ -211,4 +211,24 @@ static NSString *identifier = @&quot;CNMyTableViewCell&quot;;
211 return _tableView; 211 return _tableView;
212 } 212 }
213 213
  214 +// NSArray *name = @[@[@"通知公告", @"我的收藏"],@[@"证件申领", @"联系我们"],@[@"设置"]];
  215 +// NSArray *name = @[@[CustomStr(@"Announcements"), CustomStr(@"MyFavorite")],@[CustomStr(@"Certificates"), CustomStr(@"ContactUs")],@[CustomStr(@"Settings")]];
  216 +// NSArray *pic = @[@[@"cnlive_my_news", @"cnlive_my_collection"],@[@"cnlive_my_certificate", @"cnlive_my_tel"],@[@"cnlive_my_setting"]];
  217 +
  218 +- (NSArray *)titles{
  219 + if(!_titles){
  220 + NSArray *name = @[@[CustomStr(@"Announcements"), CustomStr(@"MyFavorite")],@[CustomStr(@"ContactUs")],@[CustomStr(@"Settings")]];
  221 + _titles = [[NSArray alloc] initWithArray:name];
  222 + }
  223 + return _titles;
  224 +}
  225 +- (NSArray *)pics{
  226 + if(!_pics){
  227 + NSArray *pic = @[@[@"cnlive_my_news", @"cnlive_my_collection"],@[@"cnlive_my_tel"],@[@"cnlive_my_setting"]];
  228 + _pics = [[NSArray alloc] initWithArray:pic];
  229 +
  230 + }
  231 + return _pics;
  232 +}
  233 +
214 @end 234 @end
CNLiveScioLive/Pages/Tools/Category/UILabel+TextAlign.h
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
11 @interface UILabel (TextAlign) 11 @interface UILabel (TextAlign)
  12 +
12 @property (nonatomic, assign) BOOL isTop; 13 @property (nonatomic, assign) BOOL isTop;
13 @property (nonatomic, assign) BOOL isBottom; 14 @property (nonatomic, assign) BOOL isBottom;
14 15
CNLiveScioLive/Pages/Tools/Category/UILabel+TextAlign.m
@@ -10,14 +10,16 @@ @@ -10,14 +10,16 @@
10 10
11 @implementation UILabel (TextAlign) 11 @implementation UILabel (TextAlign)
12 12
13 --(void)setIsTop:(BOOL)isTop { 13 +- (void)setIsTop:(BOOL)isTop {
14 14
15 if (isTop) { 15 if (isTop) {
16 CGSize fontSize = [self.text sizeWithFont:self.font]; 16 CGSize fontSize = [self.text sizeWithFont:self.font];
  17 +// CGSize fontSize = [self.text sizeWithAttributes:@{NSFontAttributeName : self.font}];
  18 +
17 //控件的高度除以一行文字的高度 19 //控件的高度除以一行文字的高度
18 int num = self.frame.size.height/fontSize.height; 20 int num = self.frame.size.height/fontSize.height;
19 //计算需要添加换行符个数 21 //计算需要添加换行符个数
20 - int newLinesToPad = num - self.numberOfLines; 22 + int newLinesToPad = num - (int)self.numberOfLines;
21 self.numberOfLines = 0; 23 self.numberOfLines = 0;
22 for(int i=0; i<newLinesToPad; i++) 24 for(int i=0; i<newLinesToPad; i++)
23 //在文字后面添加换行符"/n" 25 //在文字后面添加换行符"/n"
@@ -25,14 +27,16 @@ @@ -25,14 +27,16 @@
25 } 27 }
26 } 28 }
27 29
28 --(void)setIsBottom:(BOOL)isBottom { 30 +- (void)setIsBottom:(BOOL)isBottom {
29 31
30 if (isBottom) { 32 if (isBottom) {
31 CGSize fontSize = [self.text sizeWithFont:self.font]; 33 CGSize fontSize = [self.text sizeWithFont:self.font];
  34 +// CGSize fontSize = [self.text sizeWithAttributes:@{NSFontAttributeName : self.font}];
  35 +
32 //控件的高度除以一行文字的高度 36 //控件的高度除以一行文字的高度
33 int num = self.frame.size.height/fontSize.height; 37 int num = self.frame.size.height/fontSize.height;
34 //计算需要添加换行符个数 38 //计算需要添加换行符个数
35 - int newLinesToPad = num - self.numberOfLines; 39 + int newLinesToPad = num - (int)self.numberOfLines;
36 self.numberOfLines = 0; 40 self.numberOfLines = 0;
37 for(int i=0; i<newLinesToPad; i++) 41 for(int i=0; i<newLinesToPad; i++)
38 //在文字前面添加换行符"/n" 42 //在文字前面添加换行符"/n"