// // SubscriptionsDescriptionTableViewCell.swift // Earthquake Network // // Created by Andrea Busi on 05/04/21. // Copyright © 2021 Earthquake Network. All rights reserved. // import UIKit class SubscriptionsDescriptionTableViewCell: EQNBaseContainerTableViewCell { override var headerText: String { NSLocalizedString("inapp_list", comment: "") } // MARK: - UI private lazy var descriptionLabel: UILabel = { let label = UILabel() label.translatesAutoresizingMaskIntoConstraints = false label.textColor = AppTheme.shared.cardTextColor label.font = .preferredFont(forTextStyle: .body) label.textAlignment = .center label.numberOfLines = 0 label.textAlignment = .justified return label }() // MARK: - Internal override func setupUI() { super.setupUI() containerView.addSubview(descriptionLabel) descriptionLabel.topAnchor.constraint(equalTo: topView.bottomAnchor, constant: .cardVerticalSpacing).isActive = true descriptionLabel.leadingAnchor.constraint(equalTo: containerView.leadingAnchor, constant: .cardPadding).isActive = true descriptionLabel.trailingAnchor.constraint(equalTo: containerView.trailingAnchor, constant: .cardPadding.negative).isActive = true descriptionLabel.bottomAnchor.constraint(equalTo: containerView.bottomAnchor, constant: .cardVerticalSpacing.negative).isActive = true } override func updateUI() { super.updateUI() descriptionLabel.text = NSLocalizedString("inapp_description", comment: "") } }