Created
July 26, 2020 05:02
-
-
Save olivaresf/0e50515e1a7c6436855b35134bade745 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, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
let cell:ContactCellTableViewCell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as ContactCellTableViewCell | |
if(yourContacts.count > 0){ | |
let contact = yourContacts[indexPath.section][indexPath.row] as APContact | |
cell.nameLabel.text = contact.compositeName != nil ? contact.compositeName : "" | |
cell.phoneLabel.text = contact.phones.count > 0 ? contact.phones[0] as String : "" | |
cell.emailLabel.text = contact.emails.count > 0 ? contact.emails[0] as String : "" | |
//IMAGE: | |
//RESIZING DONE IN CUSTOM TABLE CELL !!!! | |
//cell.contactImageView.frame = CGRectMake(0, 0, 75, 75) | |
if (contact.thumbnail != nil){ | |
cell.contactImageView.image = contact.thumbnail | |
}else{ | |
cell.contactImageView.image = UIImage(named: "dummy") | |
} | |
} | |
return cell | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment