JLChen
2021-10-08 f8457b624a75bf8e41489b74f66009eee6891b8b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
//  Copyright © 2018年 dahua. All rights reserved.
//
 
import UIKit
 
class DHDetailCopyCell: UITableViewCell, IDHTableViewCell {
 
    @IBOutlet weak var titleLbl: UILabel!
    @IBOutlet weak var rightLbl: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        titleLbl.textColor = UIColor.dhcolor_c2()
        titleLbl.font = UIFont.dhFont_t2()
        rightLbl.textColor = UIColor.dhcolor_c5()
        rightLbl.font = UIFont.dhFont_t5()
        contentView.backgroundColor = UIColor.dhcolor_c43()
    }
 
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
 
        // Configure the view for the selected state
    }
    
    func config(detailItem: IDHDeviceDetailItem) {
        titleLbl.text = detailItem.itemName
        rightLbl.text = detailItem.contentStr
    }
    
    @IBAction func copyBtnClick(_ sender: UIButton) {
        
        let pasteboard = UIPasteboard.general
        pasteboard.string = rightLbl.text
        LCProgressHUD.showMsg("common_copy_success".lc_T)
    }
    
}