You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
983 B

6 years ago
6 years ago
6 years ago
6 years ago
  1. //
  2. // RecipientListTableViewCell.swift
  3. // GMERemittance
  4. //
  5. // Created by Fm-user on 12/21/17.
  6. // Copyright © 2017 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import UIKit
  9. class RecipientListTableViewCell: UITableViewCell {
  10. @IBOutlet weak var labelInitial: UILabel!
  11. @IBOutlet weak var labelRecipientName: UILabel!
  12. var model: Recipient?
  13. override func awakeFromNib() {
  14. super.awakeFromNib()
  15. // Initialization code
  16. }
  17. func setup() {
  18. let name = model?.getFullName()
  19. labelRecipientName.text = name
  20. labelInitial.text = name?.prefix(1).uppercased()
  21. labelInitial.layer.cornerRadius = labelInitial.frame.size.width/2
  22. labelInitial.backgroundColor = UIColor.init(hex: "#DE333C")
  23. layer.borderColor = UIColor(red:0.91, green:0.93, blue:0.95, alpha:1.0).cgColor
  24. layer.borderWidth = 1
  25. layer.cornerRadius = 10
  26. clipsToBounds = true
  27. }
  28. }