Skip to content

Instantly share code, notes, and snippets.

@zontan
Created September 23, 2019 18:44
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 zontan/c07bedc88b2b8b8a0e160f0c569e4cdc to your computer and use it in GitHub Desktop.
Save zontan/c07bedc88b2b8b8a0e160f0c569e4cdc to your computer and use it in GitHub Desktop.
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return resultsArray.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "userCell", for: indexPath)
if let userCell = cell as? UserTableViewCell {
let userData = resultsArray[indexPath.row]
userCell.displayName.text = userData["displayname"]
userCell.email.text = userData["email"]
}
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment