49 lines
1.4 KiB
Swift
49 lines
1.4 KiB
Swift
//
|
|
// FASettingFooterView.swift
|
|
// Fableon
|
|
//
|
|
// Created by 湖北秦九 on 2025/10/30.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class FASettingFooterView: UIView {
|
|
|
|
|
|
private lazy var logoutButton: UIButton = {
|
|
let button = FAGradientButton(type: .custom, primaryAction: UIAction(handler: { [weak self] _ in
|
|
guard let self = self else { return }
|
|
FALogin.manager.logout(completer: nil)
|
|
}))
|
|
button.layer.cornerRadius = 24
|
|
button.layer.masksToBounds = true
|
|
button.fa_colors = [UIColor.BEDFFF.cgColor, UIColor._52_A_2_F_1.cgColor]
|
|
button.fa_locations = [0, 1]
|
|
button.fa_startPoint = .init(x: 0, y: 0.5)
|
|
button.fa_endPoint = .init(x: 1, y: 0.5)
|
|
button.setTitle("Log out".localized, for: .normal)
|
|
button.setTitleColor(._000000, for: .normal)
|
|
button.titleLabel?.font = .font(ofSize: 18, weight: .semibold)
|
|
return button
|
|
}()
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
|
|
addSubview(logoutButton)
|
|
|
|
logoutButton.snp.makeConstraints { make in
|
|
make.left.equalToSuperview().offset(16)
|
|
make.centerX.equalToSuperview()
|
|
make.bottom.equalToSuperview()
|
|
make.height.equalTo(48)
|
|
}
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
}
|
|
|
|
|