Skip to content

Instantly share code, notes, and snippets.

@rafattouqir
Created March 14, 2019 06:25
Show Gist options
  • Save rafattouqir/c458c5e53c936e08a1645934d2db9dbb to your computer and use it in GitHub Desktop.
Save rafattouqir/c458c5e53c936e08a1645934d2db9dbb to your computer and use it in GitHub Desktop.
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
if collectionView === self.topCollectionView{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "topCollectionViewCell", for: indexPath) as! TopCollectionViewCell
return cell
}else{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "bottomCollectionViewCell", for: indexPath) as! BottomCollectionViewCell
return cell
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment