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

store cgpoint in userdefaults iOS swift

libc++abi: terminating due to uncaught exception of type NSException iOS swift