Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol Reusable: class {
- static func reuseIdentifier(_ addOn: String?) -> String
- }
- extension Reusable {
- static func reuseIdentifier(_ addOn: String? = nil) -> String {
- if let addOn = addOn {
- return "\(String(describing: self))-\(addOn)"
- }
- return String(describing: self)
- }
- }
- extension UICollectionViewCell: Reusable {}
- extension UITableViewCell: Reusable {}
- extension UITableViewHeaderFooterView: Reusable {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement