Files
lockdown-iOS-mirror/LockdowniOS/PaywallDescriptionLabel.swift
2023-05-01 06:24:39 +03:00

61 lines
1.5 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// 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()
}
}