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.

38 lines
948 B

  1. //
  2. // ShowAPITableViewCell.swift
  3. // GME Remit
  4. //
  5. // Created by Jeongbae Kong on 2020/04/08.
  6. // Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import UIKit
  9. protocol ShowAPIDelegate: class {
  10. func copy(on what: String)
  11. }
  12. class ShowAPITableViewCell: UITableViewCell {
  13. @IBOutlet weak var keyLabel: UILabel!
  14. @IBOutlet weak var valueLabel: UILabel!
  15. weak var delegate: ShowAPIDelegate?
  16. override func awakeFromNib() {
  17. super.awakeFromNib()
  18. // Initialization code
  19. keyLabel.adjustsFontSizeToFitWidth = true
  20. valueLabel.adjustsFontSizeToFitWidth = true
  21. }
  22. override func setSelected(_ selected: Bool, animated: Bool) {
  23. super.setSelected(selected, animated: animated)
  24. // Configure the view for the selected state
  25. }
  26. @IBAction func copyButton(_ sender: UIButton) {
  27. guard let valueText = valueLabel.text else { return }
  28. delegate?.copy(on: valueText)
  29. }
  30. }