|
|
@@ -8,6 +8,7 @@
|
|
|
import Foundation
|
|
|
import UIKit
|
|
|
import SnapKit
|
|
|
+import Combine
|
|
|
|
|
|
|
|
|
class LNJoinUsSkillFieldsEditView: UIView {
|
|
|
@@ -176,20 +177,44 @@ extension LNJoinUsSkillFieldsEditView {
|
|
|
make.width.equalToSuperview()
|
|
|
}
|
|
|
|
|
|
+ let bottomMenu = UIView()
|
|
|
+ addSubview(bottomMenu)
|
|
|
+ bottomMenu.snp.makeConstraints { make in
|
|
|
+ make.horizontalEdges.equalToSuperview()
|
|
|
+ make.bottom.equalToSuperview()
|
|
|
+ }
|
|
|
+
|
|
|
+ let bottomGradient = CAGradientLayer()
|
|
|
+ bottomGradient.colors = [
|
|
|
+ UIColor.white.withAlphaComponent(0).cgColor,
|
|
|
+ UIColor.white.cgColor,
|
|
|
+ UIColor.white.cgColor
|
|
|
+ ]
|
|
|
+ bottomGradient.locations = [0, 0.5, 1]
|
|
|
+ bottomGradient.startPoint = .init(x: 0, y: 0)
|
|
|
+ bottomGradient.endPoint = .init(x: 0, y: 1)
|
|
|
+ bottomMenu.layer.addSublayer(bottomGradient)
|
|
|
+ bottomMenu.publisher(for: \.bounds).removeDuplicates().sink { [weak bottomGradient] newValue in
|
|
|
+ guard let bottomGradient else { return }
|
|
|
+ bottomGradient.frame = newValue
|
|
|
+ }.store(in: &bag)
|
|
|
+
|
|
|
applyButton.setTitle(.init(key: "A00240"), for: .normal)
|
|
|
applyButton.setTitleColor(.text_1, for: .normal)
|
|
|
applyButton.titleLabel?.font = .heading_h3
|
|
|
applyButton.layer.cornerRadius = 23.5
|
|
|
applyButton.backgroundColor = .fill_4
|
|
|
applyButton.clipsToBounds = true
|
|
|
+ applyButton.isEnabled = false
|
|
|
applyButton.addAction(UIAction(handler: { [weak self] _ in
|
|
|
guard let self else { return }
|
|
|
commit()
|
|
|
}), for: .touchUpInside)
|
|
|
- addSubview(applyButton)
|
|
|
+ bottomMenu.addSubview(applyButton)
|
|
|
applyButton.snp.makeConstraints { make in
|
|
|
make.horizontalEdges.equalToSuperview().inset(16)
|
|
|
make.bottom.equalToSuperview().offset(commonBottomInset)
|
|
|
+ make.top.equalToSuperview()
|
|
|
make.height.equalTo(47)
|
|
|
}
|
|
|
}
|