Home / IOS Development / ios – What is a good approach to sharing a data model between a table / aggregation view controller and the associated, differentiable data source part?

ios – What is a good approach to sharing a data model between a table / aggregation view controller and the associated, differentiable data source part?



I have one UITableViewController with a model property declared in it. When you migrate from UITableViewDataSource protocol conformity with a subclass of UITableViewDiffableDataSource outside the table view controller, the model is no longer available in the data source.

What would be a recommended approach to sharing a data model between the two, say a callback from a cell deletion delegate in the differentiable data source, may reflect the change in the model property and the CloudKit database.


Source link