[Solved] how to use two CollectionView on same view controller scroll one by one [closed]


You can add two collection view in a single view controller by dragging it.

but you have to validate UIcollection view like

func collectionView(collectionView: UICollectionView,
        cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {  
    var cell = HomeCollectionViewCell()

if(collectionView == self.collName1)
            {  
    cell = collName.dequeueReusableCellWithReuseIdentifier("CellIdentifier", forIndexPath: indexPath) as! HomeCollectionViewCell  
}  
else  
if(collectionView == self.collName2)  
{}     
return cell
}   

solved how to use two CollectionView on same view controller scroll one by one [closed]