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

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -