RQUserInfoViewController.m 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // RQUserInfoViewController.m
  3. // SDJK
  4. //
  5. // Created by 张嵘 on 2021/8/3.
  6. //
  7. #import "RQUserInfoViewController.h"
  8. @interface RQUserInfoViewController ()
  9. /// viewModel
  10. @property (nonatomic, readonly, strong) RQUserInfoViewModel *viewModel;
  11. @end
  12. @implementation RQUserInfoViewController
  13. @dynamic viewModel;
  14. #pragma mark - SystemMethod
  15. - (void)viewDidLoad {
  16. [super viewDidLoad];
  17. // Do any additional setup after loading the view.
  18. }
  19. #pragma mark - OverrideMethods
  20. - (UITableViewCell *)tableView:(UITableView *)tableView dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath {
  21. RQCommonGroupViewModel *groupViewModel = self.viewModel.dataSource[indexPath.section];
  22. RQCommonItemViewModel *itemViewModel = groupViewModel.itemViewModels[indexPath.row];
  23. return [NSClassFromString(itemViewModel.itemClassName) cellWithTableView:tableView];
  24. }
  25. - (void)configureCell:(RQCommonCell *)cell atIndexPath:(NSIndexPath *)indexPath withObject:(id)object {
  26. [cell bindViewModel:object];
  27. }
  28. @end