RankingListHeaderView.swift 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // RankingListHeaderView.swift
  3. // xingchuangke
  4. //
  5. // Created by Virgil on 2019/4/17.
  6. // Copyright © 2019 Virgil. All rights reserved.
  7. //
  8. import UIKit
  9. class RankingListHeaderView: UIView {
  10. @IBOutlet weak var img1: UIImageView!
  11. @IBOutlet weak var img2: UIImageView!
  12. @IBOutlet weak var img3: UIImageView!
  13. @IBOutlet weak var lblName1: UILabel!
  14. @IBOutlet weak var lblName2: UILabel!
  15. @IBOutlet weak var lblName3: UILabel!
  16. @IBOutlet weak var lbl3: UILabel!
  17. @IBOutlet weak var lbl1: UILabel!
  18. @IBOutlet weak var lbl2: UILabel!
  19. @IBOutlet weak var viewTop3: UIView!
  20. @IBOutlet weak var viewTop2: UIView!
  21. @IBOutlet weak var viewTop1: UIView!
  22. @IBOutlet weak var lblTime: UILabel!
  23. func initView(strNames: [String], strIcons: [String]) {
  24. lblName1.text = strNames[0]
  25. lblName2.text = strNames[1]
  26. lblName3.text = strNames[2]
  27. lbl1.setCornerRadius()
  28. lbl2.setCornerRadius()
  29. lbl3.setCornerRadius()
  30. img1.loadImage(imgUrl: strIcons[0], defaultImage: "")
  31. img2.loadImage(imgUrl: strIcons[1], defaultImage: "")
  32. img3.loadImage(imgUrl: strIcons[2], defaultImage: "")
  33. img1.setLayer(borderWidth: 2, color: 0xfdc623)
  34. img2.setLayer(borderWidth: 2, color: 0xe0e1ea)
  35. img3.setLayer(borderWidth: 2, color: 0xd6a468)
  36. img1.setCornerRadius()
  37. img2.setCornerRadius()
  38. img3.setCornerRadius()
  39. }
  40. }