Commit e7837bf6 authored by lujunye's avatar lujunye

供应商/分销商管理公用CELL

parent 8f358d4a
......@@ -9,6 +9,7 @@
import UIKit
class GYS_GuanLi_Cell: UITableViewCell {
var isFenXiaoShang : Bool = false //分销商管理 == true,改变合作按钮颜色。
@IBOutlet weak var icon_Img: UIImageView!//公司LOGO
@IBOutlet weak var status_Lbl: UILabel!//状态
......@@ -16,6 +17,10 @@ class GYS_GuanLi_Cell: UITableViewCell {
@IBOutlet weak var adr_Lbl: UILabel!//地址
@IBOutlet weak var title_Lbl: UILabel!//公司名
@IBAction func stopAction(_ sender: UIButton) {
if isFenXiaoShang {
//分销商管理,删除功能。
return
}
print("终止合作")
}
@IBOutlet weak var submitBtn: UIButton!//终止按钮-默认隐藏
......@@ -25,7 +30,17 @@ class GYS_GuanLi_Cell: UITableViewCell {
self.selectionStyle = .none
}
override func layoutIfNeeded() {
super.layoutIfNeeded()
if isFenXiaoShang {
submitBtn.isHidden = false
submitBtn.backgroundColor = UIColor.white
submitBtn.layer.borderWidth = 1
submitBtn.layer.borderColor = UIColor(named: "按钮背景颜色")?.cgColor
submitBtn.setTitle("删除", for: .normal)
submitBtn.titleLabel?.textColor = UIColor(named: "按钮背景颜色")
}
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment