JXReadListVC.m 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. //
  2. // JXReadListVC.m
  3. // shiku_im
  4. //
  5. // Created by p on 2017/9/2.
  6. // Copyright © 2017年 Reese. All rights reserved.
  7. //
  8. #import "JXReadListVC.h"
  9. #import "JXReadListCell.h"
  10. @interface JXReadListVC ()
  11. @property (nonatomic, strong) NSMutableArray *array;
  12. @end
  13. @implementation JXReadListVC
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. self.heightHeader = JX_SCREEN_TOP;
  17. self.heightFooter = 0;
  18. self.isGotoBack = YES;
  19. //self.view.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_BOTTOM);
  20. [self createHeadAndFoot];
  21. self.title = Localized(@"JX_ReadList");
  22. _array = [NSMutableArray array];
  23. [self getLocData];
  24. }
  25. - (void) getLocData {
  26. _array = [self.msg fetchReadList];
  27. [self.tableView reloadData];
  28. }
  29. #pragma mark ---------tableView协议----------------
  30. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  31. {
  32. NSString* cellName = [NSString stringWithFormat:@"readListCell"];
  33. JXReadListCell *readListCell = [tableView dequeueReusableCellWithIdentifier:cellName];
  34. if (!readListCell) {
  35. readListCell = [[JXReadListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellName];
  36. }
  37. readListCell.room = _room;
  38. JXUserObject * obj = _array[indexPath.row];
  39. [readListCell setData:obj];
  40. return readListCell;
  41. }
  42. -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  43. {
  44. return _array.count;
  45. }
  46. -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  47. {
  48. return 60;
  49. }
  50. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  51. }
  52. - (void)didReceiveMemoryWarning {
  53. [super didReceiveMemoryWarning];
  54. // Dispose of any resources that can be recreated.
  55. }
  56. /*
  57. #pragma mark - Navigation
  58. // In a storyboard-based application, you will often want to do a little preparation before navigation
  59. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  60. // Get the new view controller using [segue destinationViewController].
  61. // Pass the selected object to the new view controller.
  62. }
  63. */
  64. @end