// // SettingSectionHeaderView.swift // Earthquake Network // // Created by Busi Andrea on 25/08/2020. // Copyright © 2020 Earthquake Network. All rights reserved. // import UIKit class SettingSectionHeaderView: UITableViewHeaderFooterView { static let Identifier = "SectionHeaderView" static let Height = 50.0 // MARK: - Properties lazy var titleLabel: UILabel = { let titleLabel = UILabel() titleLabel.font = UIFont.preferredFont(forTextStyle: .headline) titleLabel.textColor = AppTheme.Colors.lightBlue return titleLabel }() // MARK: - Init override init(reuseIdentifier: String?) { super.init(reuseIdentifier: reuseIdentifier) setupUI() } required init?(coder: NSCoder) { super.init(coder: coder) setupUI() } // MARK: - Private private func setupUI() { contentView.addSubview(titleLabel) titleLabel.translatesAutoresizingMaskIntoConstraints = false titleLabel.centerYAnchor.constraint(equalTo: contentView.centerYAnchor).isActive = true titleLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor).isActive = true titleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor).isActive = true } }