Skip to content

Instantly share code, notes, and snippets.

@Yorzic
Last active May 29, 2020 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yorzic/ef59934bf8340b20bfe078e54d64f111 to your computer and use it in GitHub Desktop.
Save Yorzic/ef59934bf8340b20bfe078e54d64f111 to your computer and use it in GitHub Desktop.
Include custom cell with xib
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UINib(nibName: "DataCell", bundle: nil), forCellReuseIdentifier: "DataCell")
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "DataCell", for: indexPath) as! DataCell
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment