| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- //
- // QSLHomeButtonView.swift
- // QuickSearchLocation
- //
- // Created by mac on 2024/4/11.
- //
- import UIKit
- class QSLHomeButtonView: UIView {
-
- lazy var homeResortBtn: UIButton = {
-
- let _homeResortBtn = UIButton(frame: CGRect(x: 0, y: 0, width: 40, height: 52))
- _homeResortBtn.textColor(QSLColor.textColor_333)
- _homeResortBtn.font(10)
- _homeResortBtn.title("求助")
-
- _homeResortBtn.image(UIImage(named: "home_btn_resort"))
- _homeResortBtn.setImageTitleLayout(.imgTop, spacing: 2)
-
- return _homeResortBtn
- }()
-
- lazy var homeRefreshBtn: UIButton = {
-
- let _homeRefreshBtn = UIButton(frame: CGRect(x: 0, y: 0, width: 40, height: 52))
- _homeRefreshBtn.textColor(QSLColor.textColor_333)
- _homeRefreshBtn.font(10)
- _homeRefreshBtn.title("刷新")
-
- _homeRefreshBtn.image(UIImage(named: "home_btn_refresh"))
- _homeRefreshBtn.setImageTitleLayout(.imgTop, spacing: 2)
-
- return _homeRefreshBtn
- }()
-
- override init(frame: CGRect) {
- super.init(frame: frame)
-
- addRadius(radius: 6)
- effectViewWithAlpha(alpha: 1, size: CGSize(width: 40, height: 104), style: .light)
-
- addSubview(homeResortBtn)
- addSubview(homeRefreshBtn)
- }
-
- override func layoutSubviews() {
- super.layoutSubviews()
-
- homeResortBtn.snp.makeConstraints { make in
- make.top.left.right.equalTo(0)
- make.height.equalTo(52)
- }
-
- homeRefreshBtn.snp.makeConstraints { make in
- make.bottom.left.right.equalTo(0)
- make.height.equalTo(52)
- }
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
- }
|