Problem: I want to get the item from rxcollectionviewdatasource from multiple sections with multiple items. Solution : func collectionView ( _ collectionView: UICollectionView , layout collectionViewLayout: UICollectionViewLayout , sizeForItemAt indexPath: IndexPath ) -> CGSize { if let item = try ? d ataSource . model ( at : indexPath) as ? My Item { switch item { case . model1 (_): return CGSize . zero case . model2 ( info : let info): return CGSize ( width : 320, height : 100 ) case . model3 ( info : _): return CGSize(width: 320, height: 100 ) case . model4 ( info : _): return CGSize ( width : 320, height : 100 ) } } return CGSize . zero } ViewModel: typealias SectionOfSearch = SectionModel < CollViewSea