How to set datasource for UICollectionviewcell and title iOS swift?

Problem: 

I want to set the datasource to the collectionview with rxswift to set the title also

Solution:

    private lazy var dataSource = RxTableViewSectionedReloadDataSource<SectionOfColl>(configureCell: configureCell, titleForHeaderInSection: {

        ds, index in

        return ds.sectionModels[index].model.title

    })


The above datasource will return the title for the collectionview section.

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift