RAHomeViewController+HomeTableDataSource.m 931 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // RAHomeViewController+HomeTableDataSource.m
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/6/1.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import "RAHomeViewController+HomeTableDataSource.h"
  9. #import "RAOrderCell.h"
  10. #import "RAHomeOrderModel.h"
  11. @implementation RAHomeViewController (HomeTableDataSource)
  12. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  13. return [self orderSectionCount];
  14. }
  15. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  16. return [self orderCountForSection:section];
  17. }
  18. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  19. RAOrderCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAOrderCell" forIndexPath:indexPath];
  20. RAHomeOrderModel *order = [self orderModelForIndexPath:indexPath];
  21. cell.orderModel = order;
  22. return cell;
  23. }
  24. @end