-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathPaywallDescriptionLabel.swift
60 lines (52 loc) · 1.53 KB
/
PaywallDescriptionLabel.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// AdvancedDescriptionLabel.swift
// LockdownSandbox
//
// Created by Алишер Ахметжанов on 27.04.2023.
//
import UIKit
final class PaywallDescriptionLabel: UIView {
//MARK: Properties
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .white
label.font = fontBold26
label.textAlignment = .left
label.numberOfLines = 0
return label
}()
lazy var subtitleLabel: UILabel = {
let label = UILabel()
label.textColor = .white
label.font = fontSemiBold15
label.textAlignment = .left
label.numberOfLines = 0
return label
}()
private lazy var stackView: UIStackView = {
let stackView = UIStackView()
stackView.addArrangedSubview(titleLabel)
stackView.addArrangedSubview(subtitleLabel)
stackView.axis = .vertical
stackView.distribution = .fillProportionally
stackView.alignment = .leading
stackView.spacing = 8
return stackView
}()
//MARK: Initialization
override init(frame: CGRect) {
super.init(frame: frame)
configureUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//MARK: Functions
private func configureUI() {
addSubview(stackView)
stackView.anchors.top.pin()
stackView.anchors.bottom.marginsPin()
stackView.anchors.leading.pin()
stackView.anchors.trailing.pin()
}
}