Commit 09c19fd8300d7ea92a0eb1c02b34717613d0773b
1 parent
1a6a37c8
专题增加无图模式
Showing
2 changed files
with
48 additions
and
0 deletions
CNLiveScioLive/Pages/Home/新闻详情/OldController/MoreSpecialViewController.m
| @@ -12,6 +12,7 @@ | @@ -12,6 +12,7 @@ | ||
| 12 | #import "BigImageTableViewCell.h" | 12 | #import "BigImageTableViewCell.h" |
| 13 | #import "LeftImageTableViewCell.h" | 13 | #import "LeftImageTableViewCell.h" |
| 14 | #import "ThreeImageTableViewCell.h" | 14 | #import "ThreeImageTableViewCell.h" |
| 15 | +#import "NoPictureTableViewCell.h" | ||
| 15 | 16 | ||
| 16 | @interface MoreSpecialViewController ()<UITableViewDataSource,UITableViewDelegate> { | 17 | @interface MoreSpecialViewController ()<UITableViewDataSource,UITableViewDelegate> { |
| 17 | NSDictionary *_dictionary; | 18 | NSDictionary *_dictionary; |
| @@ -352,6 +353,28 @@ | @@ -352,6 +353,28 @@ | ||
| 352 | } | 353 | } |
| 353 | return cell; | 354 | return cell; |
| 354 | } else if ([@"3" isEqualToString:showType]) { | 355 | } else if ([@"3" isEqualToString:showType]) { |
| 356 | + if ([@"" isEqualToString:_dic[@"img"]]) { | ||
| 357 | + static NSString *identifier = @"NoPictureCell"; | ||
| 358 | + NoPictureTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; | ||
| 359 | + if (cell == nil) { | ||
| 360 | + cell = [[NoPictureTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; | ||
| 361 | + cell.selectionStyle = UITableViewCellSelectionStyleNone; | ||
| 362 | + } | ||
| 363 | + cell.titleLabel.text = _dic[@"title"]; | ||
| 364 | + cell.timeLabel.text = [_dic[@"createDate"] componentsSeparatedByString:@" "][0]; | ||
| 365 | + NSString *text = [NSString stringWithFormat:@"%@",_dic[@"tags"]]; | ||
| 366 | + if ([text containsString:@"null"]) { | ||
| 367 | + text = @""; | ||
| 368 | + } | ||
| 369 | + if ([text length] > 0) { | ||
| 370 | + [cell.tagsLabel setHidden:NO]; | ||
| 371 | + [cell.tagsLabel setText:text]; | ||
| 372 | + [cell reSetTagFrame]; | ||
| 373 | + } else { | ||
| 374 | + [cell.tagsLabel setHidden:YES]; | ||
| 375 | + } | ||
| 376 | + return cell; | ||
| 377 | + } else { | ||
| 355 | static NSString *identifier = @"LeftImageCell"; | 378 | static NSString *identifier = @"LeftImageCell"; |
| 356 | LeftImageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; | 379 | LeftImageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
| 357 | if (cell == nil) { | 380 | if (cell == nil) { |
| @@ -387,6 +410,7 @@ | @@ -387,6 +410,7 @@ | ||
| 387 | [cell.tagsLabel setHidden:YES]; | 410 | [cell.tagsLabel setHidden:YES]; |
| 388 | } | 411 | } |
| 389 | return cell; | 412 | return cell; |
| 413 | + } | ||
| 390 | } | 414 | } |
| 391 | static NSString *identifier = @"cell"; | 415 | static NSString *identifier = @"cell"; |
| 392 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; | 416 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
CNLiveScioLive/Pages/Home/新闻详情/OldController/SCIOSpecialViewController.m
| @@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
| 14 | #import "BigImageTableViewCell.h" | 14 | #import "BigImageTableViewCell.h" |
| 15 | #import "LeftImageTableViewCell.h" | 15 | #import "LeftImageTableViewCell.h" |
| 16 | #import "ThreeImageTableViewCell.h" | 16 | #import "ThreeImageTableViewCell.h" |
| 17 | +#import "NoPictureTableViewCell.h" | ||
| 17 | #import "YWWebScrollView.h" | 18 | #import "YWWebScrollView.h" |
| 18 | #import "Html5Utils.h" | 19 | #import "Html5Utils.h" |
| 19 | 20 | ||
| @@ -504,6 +505,28 @@ | @@ -504,6 +505,28 @@ | ||
| 504 | } | 505 | } |
| 505 | return cell; | 506 | return cell; |
| 506 | } else if ([@"3" isEqualToString:showType]) { | 507 | } else if ([@"3" isEqualToString:showType]) { |
| 508 | + if ([@"" isEqualToString:_dic[@"img"]]) { | ||
| 509 | + static NSString *identifier = @"NoPictureCell"; | ||
| 510 | + NoPictureTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; | ||
| 511 | + if (cell == nil) { | ||
| 512 | + cell = [[NoPictureTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; | ||
| 513 | + cell.selectionStyle = UITableViewCellSelectionStyleNone; | ||
| 514 | + } | ||
| 515 | + cell.titleLabel.text = _dic[@"title"]; | ||
| 516 | + cell.timeLabel.text = [_dic[@"createDate"] componentsSeparatedByString:@" "][0]; | ||
| 517 | + NSString *text = [NSString stringWithFormat:@"%@",_dic[@"tags"]]; | ||
| 518 | + if ([text containsString:@"null"]) { | ||
| 519 | + text = @""; | ||
| 520 | + } | ||
| 521 | + if ([text length] > 0) { | ||
| 522 | + [cell.tagsLabel setHidden:NO]; | ||
| 523 | + [cell.tagsLabel setText:text]; | ||
| 524 | + [cell reSetTagFrame]; | ||
| 525 | + } else { | ||
| 526 | + [cell.tagsLabel setHidden:YES]; | ||
| 527 | + } | ||
| 528 | + return cell; | ||
| 529 | + } else { | ||
| 507 | static NSString *identifier = @"LeftImageCell"; | 530 | static NSString *identifier = @"LeftImageCell"; |
| 508 | LeftImageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; | 531 | LeftImageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
| 509 | if (cell == nil) { | 532 | if (cell == nil) { |
| @@ -540,6 +563,7 @@ | @@ -540,6 +563,7 @@ | ||
| 540 | [cell.tagsLabel setHidden:YES]; | 563 | [cell.tagsLabel setHidden:YES]; |
| 541 | } | 564 | } |
| 542 | return cell; | 565 | return cell; |
| 566 | + } | ||
| 543 | } | 567 | } |
| 544 | static NSString *identifier = @"cell"; | 568 | static NSString *identifier = @"cell"; |
| 545 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; | 569 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |