RADetailActionSelectionViewController+TableDataSource.m 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // RADetailActionSelectionViewController+TableDataSource.m
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/6/4.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import "RADetailActionSelectionViewController+TableDataSource.h"
  9. #import "RADetailActionSelectionModel.h"
  10. #import "RADetailActionSelectionCell.h"
  11. @implementation RADetailActionSelectionViewController (TableDataSource)
  12. - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
  13. RADetailActionSelectionCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RADetailActionSelectionCell" forIndexPath:indexPath];
  14. RADetailActionSelectionModel *model = [self.actions objectAtIndex:indexPath.row];
  15. cell.model = model;
  16. return cell;
  17. }
  18. - (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  19. return self.actions.count;
  20. }
  21. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  22. return 1;
  23. }
  24. @end