1234567891011121314151617181920212223242526272829303132333435 |
- //
- // RQLearningMaterialsViewController.m
- // SDJK
- //
- // Created by 张嵘 on 2022/6/30.
- //
- #import "RQLearningMaterialsViewController.h"
- @interface RQLearningMaterialsViewController ()
- /// viewModel
- @property (nonatomic, readonly, strong) RQLearningMaterialsViewModel *viewModel;
- @end
- @implementation RQLearningMaterialsViewController
- @dynamic viewModel;
- #pragma mark - SystemMethod
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- }
- #pragma mark - OverrideMethods
- - (UITableViewCell *)tableView:(UITableView *)tableView dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath {
- RQCommonGroupViewModel *groupViewModel = self.viewModel.dataSource[indexPath.section];
- RQCommonItemViewModel *itemViewModel = groupViewModel.itemViewModels[indexPath.row];
- return [NSClassFromString(itemViewModel.itemClassName) cellWithTableView:tableView];
- }
- - (void)configureCell:(RQCommonCell *)cell atIndexPath:(NSIndexPath *)indexPath withObject:(id)object {
- [cell bindViewModel:object];
- }
- @end
|