Last active
April 6, 2021 11:40
-
-
Save vladimir-anisimov/53744be7b59c9bbd3a78411add9b5f17 to your computer and use it in GitHub Desktop.
Reuse identifier for reusable elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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