Skip to content

Instantly share code, notes, and snippets.

@andr3a88
Created December 12, 2017 15:32
Show Gist options
  • Save andr3a88/1787b44534adee17d043d801c02ec481 to your computer and use it in GitHub Desktop.
Save andr3a88/1787b44534adee17d043d801c02ec481 to your computer and use it in GitHub Desktop.
ReuseIdentifying Protocol
protocol ReuseIdentifying {
static var reuseIdentifier: String { get }
}
extension ReuseIdentifying {
static var reuseIdentifier: String {
return String(describing: Self.self)
}
}
extension UITableViewCell: ReuseIdentifying {}
extension UICollectionViewCell: ReuseIdentifying {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment