Skip to content

Instantly share code, notes, and snippets.

@vladimir-anisimov
Last active April 6, 2021 11:40
Show Gist options
  • Save vladimir-anisimov/53744be7b59c9bbd3a78411add9b5f17 to your computer and use it in GitHub Desktop.
Save vladimir-anisimov/53744be7b59c9bbd3a78411add9b5f17 to your computer and use it in GitHub Desktop.
Reuse identifier for reusable elements
import UIKit
protocol Reusable: class {
static var reuseIdentifier: String { get }
}
extension UICollectionViewCell: Reusable {
static var reuseIdentifier: String {
return self.description()
}
}
extension UITableViewCell: Reusable {
static var reuseIdentifier: String {
return self.description()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment