12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // SBTParamSet_TXCell.swift
- // SolarBT
- //
- // Created by weclouds on 2019/3/14.
- // Copyright © 2019 weclouds. All rights reserved.
- //
- import UIKit
- class SBTParamSet_TXCell: UITableViewCell {
- var isOld :Bool? = false{
- didSet{
- if self.isOld == true{
- self.txView.backgroundColor = UIColor(hexString: "F1F1F1")
- }else{
- self.txView.backgroundColor = UIColor(hexString: "FFFFFF")
- }
- }
- }
-
- var tx :String?{
- didSet{
- txValue.text = self.tx
- }
- }
- @IBOutlet weak var txportLabel: UILabel!
- var itemdidSelectCallback:(()->Void)?
- @IBOutlet weak var txView: UIView!
- @IBOutlet weak var txValue: UILabel!
- override func awakeFromNib() {
- super.awakeFromNib()
- // Initialization code
- txportLabel.text = "TX_port_function".da_localizedStr()
- let tap = UITapGestureRecognizer(target: self, action: #selector(tapAction))
- txView.addGestureRecognizer(tap)
- }
- override func setSelected(_ selected: Bool, animated: Bool) {
- super.setSelected(selected, animated: animated)
- // Configure the view for the selected state
- }
-
- override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
- return super.hitTest(point, with: event)
- }
-
- @objc func tapAction() {
- if self.isOld == false {
- itemdidSelectCallback!()
- }
-
- }
- }
|