Skip to content

Reuse cell or header of TableView or CollectionView without indicating the reuse identifier by just telling the compiler the type of the cell instead of inferring it

License

Notifications You must be signed in to change notification settings

Papershift/Reusable

 
 

Repository files navigation

Reusable

Reuse cell or header of UITableView or UICollectionView without indicating the reuse identifier by just telling the compiler the type of the cell instead of inferring it

Example: let bannerCollectionViewCell: BannerCollectionViewCell = collectionView.dequeueReusableCell(indexPath: indexPath) This line of code indicates the type of the cell to BannerCollectionViewCell which lets the compiler know the reuseIdentifier so it can dequeue it without the explicit declaration of it

Same behaviour is applied to UITableView

About

Reuse cell or header of TableView or CollectionView without indicating the reuse identifier by just telling the compiler the type of the cell instead of inferring it

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 65.3%
  • Swift 29.6%
  • Objective-C 5.1%