Last active
July 26, 2020 05:46
-
-
Save olivaresf/01e7f2690bb661a797c1c604db6cf809 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
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", | |
for: indexPath as IndexPath) as! ContactCellTableViewCell | |
let contactsInSection = yourContacts[indexPath.section] as! NSArray | |
let contactForRow = contactsInSection[indexPath.row] as! APContact | |
cell.nameLabel.text = contactForRow.name?.compositeName ?? "" | |
cell.phoneLabel.text = contactForRow.phones?.first?.number | |
cell.emailLabel.text = contactForRow.emails?.first?.address | |
cell.contactImageView.image = contactForRow.thumbnail | |
return cell | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment