// // DeviceFooterView.swift // FireBoltt // // Created by ecell on 2023/9/13. // Copyright © 2023 Sheldon. All rights reserved. // import UIKit class DeviceFooterView: UIView { lazy var unBindingBtn: UIButton = { let btn = UIButton(type: .custom).then { $0.setTitle(MultiLanguageKey_FB.unBindingFB.localized, for: .normal) $0.setTitleColor(.white, for: .normal) $0.titleLabel?.font = SystemRegularFont(18) } btn.gradient(colors: [kHexColor(0x59AAFF), kHexColor(0x2B75FF)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5), locations: [0, 1], autoLaoutFrame: CGRect(x: 0, y: 0, width: self.frame.size.width-40, height: kScaleWidth(50))) btn.layer.cornerRadius = kScaleWidth(25) btn.layer.masksToBounds = true return btn }() override init(frame: CGRect) { super.init(frame: frame) self.addSubview(unBindingBtn) setUpUI() } func setUpUI() { unBindingBtn.snp.makeConstraints { make in make.left.right.equalTo(self).inset(20) make.centerY.equalTo(self) make.height.equalTo(kScaleWidth(50)); } } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } /* // Only override draw() if you perform custom drawing. // An empty implementation adversely affects performance during animation. override func draw(_ rect: CGRect) { // Drawing code } */ }