RADetailActionSelectionViewController+TableDelegate.m 906 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // RADetailActionSelectionViewController+TableDelegate.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+TableDelegate.h"
  9. #import "RADetailActionSelectionModel.h"
  10. @implementation RADetailActionSelectionViewController (TableDelegate)
  11. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  12. return 44.0f;
  13. }
  14. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  15. [self dismissViewControllerAnimated:NO completion:^{
  16. if (self.delegate && [self.delegate respondsToSelector:@selector(detailSelectAction:)]) {
  17. RADetailActionSelectionModel *model = [self.actions objectAtIndex:indexPath.row];
  18. [self.delegate detailSelectAction:model];
  19. }
  20. }];
  21. }
  22. @end