swift - How to observe a change in viewModel in order to reload collectionView using RxSwift? -
i have following code configure collectionview:
viewmodel? .observableexercises .bindto( exercisescollectionview .rx .items(cellidentifier: "my identifier", celltype: exercisecollectionviewcell.self)) { index, exercise, cell in cell.exercise = exercise } .adddisposableto(disposebag)
it works fine @ first, later when viewmodel.observableexercises
gets updated have exercisescollectionview
reload data. how should it?
Comments
Post a Comment