Created
December 7, 2018 10:50
-
-
Save shaktiprakash099/0fe033e9e26d5b9da029dc52ad153631 to your computer and use it in GitHub Desktop.
This file contains 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
extension ItemsListsViewController:UITableViewDelegate,UITableViewDataSource{ | |
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | |
return 80.0 | |
} | |
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
return itemLists.count | |
} | |
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
let cell = tableView.dequeueReusableCell(withIdentifier: "ItemListsTableViewCell", for: indexPath) as! ItemListsTableViewCell | |
let itemlist = itemLists[indexPath.row] | |
cell.userNamelable.text = "\(itemlist.firstName) \(itemlist.lastName)" | |
cell.userEmailIdLable.text = "\(itemlist.emailId)" | |
if let imageUrl = URL(string: itemlist.imageUrl) { | |
cell.userImageView.sd_setImage(with: imageUrl,placeholderImage: #imageLiteral(resourceName: "defaultavatar")) | |
} | |
return cell | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment