Skip to content

Instantly share code, notes, and snippets.

@jimmythai
Last active June 19, 2018 05:46
Show Gist options
  • Select an option

  • Save jimmythai/1da3b6e2c0463766ded1609b0490d242 to your computer and use it in GitHub Desktop.

Select an option

Save jimmythai/1da3b6e2c0463766ded1609b0490d242 to your computer and use it in GitHub Desktop.
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(SomeTableViewCell.self, bundle: nil), forCellReuseIdentifier: "\(SomeTableViewCell.self)")
// tableView.register(UINib(nibName: "\(SomeTableViewCell.self)", bundle: nil), forCellReuseIdentifier: "\(SomeTableViewCell.self)")
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(SomeTableViewCell.self, for: indexPath) as! SomeTableViewCell
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment