Hi, I have a question related to architecture of view model and VC.
I'm want to add tvDataSource to PostsViewModel.swift. But can't understand it will be in input or in output. Now in VC i have some like:
let tvDataSource = RxTableViewSectionedReloadDataSource<SectionOfCustomData>(configureCell: { dataSource, tableView, indexPath, _ in
switch dataSource[indexPath] {
case .customData(let customData):
let cell = tableView.dequeue(Reusable.petCell, for: indexPath)
return cell
case .string(let string):
let cell = tableView.dequeue(Reusable.addItemCell, for: indexPath)
return cell
}
})
I can't understood cell we need configure in VC, but tvDataSource in viewModel. So what i need change to configure dataSource in viewModel. Because let sections: Driver<[SectionOfCustomData]> i have in viewModel Output.
Hi, I have a question related to architecture of view model and VC. I'm want to add tvDataSource to PostsViewModel.swift. But can't understand it will be in input or in output. Now in VC i have some like:
and bind this in in func VC:
I can't understood cell we need configure in VC, but tvDataSource in viewModel. So what i need change to configure dataSource in viewModel. Because
let sections: Driver<[SectionOfCustomData]>
i have in viewModel Output.Thanks