Created
June 19, 2018 06:00
-
-
Save jimmythai/9a07fcbf82860a1ea4214832dac2cefa 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
| // In SomeTableViewCell.swift | |
| class SomeTableViewCell: UITableViewCell, Reusable { | |
| override init(frame: CGRect) { | |
| super.init(frame: frame) | |
| } | |
| required init?(coder aDecoder: NSCoder) { | |
| fatalError("init(coder: ) has not been implemented") | |
| } | |
| } | |
| // In SomeTableView.swift | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| tableView.register(SomeTableViewCell.self) | |
| } | |
| func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
| return tableView.dequeueReusableCell(SomeTableViewCell.self) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment