Created
January 2, 2018 14:44
-
-
Save joelmarquez90/28c2e24dddb398b1336bf3d4dcc0e547 to your computer and use it in GitHub Desktop.
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
class BaseTableViewCell<Element: Codable>: UITableViewCell { | |
public var model: Element? { | |
didSet { | |
setupCell() | |
} | |
} | |
public func setupCell() {} | |
public class func nib() -> UINib { | |
return UINib(nibName: String(describing: self), bundle: nil) | |
} | |
public class func cellReuseIdentifier() -> String { | |
return "\(String(describing: self))ReuseIdentifier" | |
} | |
public class func cellHeight() -> CGFloat { | |
return 44 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment