/
sberpay
/
AgeGate-iOS
Обзор
Документация
Войти
/
sberpay
/
AgeGate-iOS
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
develop
AgeGateExample/Presentation/ConfigModule/Cells/ListCell.swift
61 строка
2 KB
SergeyGladkiy
[0.2.0] БДСЧ сценарий
30 июл 2026, 21:57
30 июл 2026, 21:57
cbcdfcb
Код
Авторство
О чём код?
// // ListCell.swift // AgeGateExample // // Created by Гладкий Сергей Игоревич on 24.07.2026. // import UIKit /// Строка со значением справа. По тапу презентер показывает выбор. final class ListCell: UITableViewCell { private lazy var titleLabel: UILabel = { let view = UILabel() view.textColor = .label view.font = .systemFont(ofSize: 15) return view }() private lazy var valueLabel: UILabel = { let view = UILabel() view.textColor = .secondaryLabel view.font = .systemFont(ofSize: 15) view.textAlignment = .right return view }() private lazy var stackView: UIStackView = { let view = UIStackView(arrangedSubviews: [titleLabel, valueLabel]) view.axis = .horizontal view.alignment = .center view.spacing = 10 view.translatesAutoresizingMaskIntoConstraints = false return view }() override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) accessoryType = .disclosureIndicator setupUI() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } func config(title: String, value: String) { titleLabel.text = title valueLabel.text = value } private func setupUI() { contentView.addSubview(stackView) NSLayoutConstraint.activate([ stackView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 10), stackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16), stackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -8), stackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -10) ]) } }