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

//
// ShowAPITableViewCell.swift
// GME Remit
//
// Created by Jeongbae Kong on 2020/04/08.
// Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved.
//
import UIKit
protocol ShowAPIDelegate: class {
func copy(on what: String)
}
class ShowAPITableViewCell: UITableViewCell {
@IBOutlet weak var keyLabel: UILabel!
@IBOutlet weak var valueLabel: UILabel!
weak var delegate: ShowAPIDelegate?
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
keyLabel.adjustsFontSizeToFitWidth = true
valueLabel.adjustsFontSizeToFitWidth = true
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
@IBAction func copyButton(_ sender: UIButton) {
guard let valueText = valueLabel.text else { return }
delegate?.copy(on: valueText)
}
}