52 lines
1.7 KiB
Swift
52 lines
1.7 KiB
Swift
//
|
|
// SegnalazioniSendReportCell.swift
|
|
// Earthquake Network
|
|
//
|
|
// Created by Andrea Busi on 04/04/21.
|
|
// Copyright © 2021 Earthquake Network. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class SegnalazioniSendReportCell: EQNBaseTableViewCell {
|
|
|
|
@IBOutlet private weak var headerLabel: UILabel!
|
|
@IBOutlet private weak var descriptionLabel: UILabel!
|
|
@IBOutlet private weak var mildLabel: UILabel!
|
|
@IBOutlet private weak var mildButton: UIButton!
|
|
@IBOutlet private weak var strongLabel: UILabel!
|
|
@IBOutlet private weak var strongButton: UIButton!
|
|
@IBOutlet private weak var veryStrongLabel: UILabel!
|
|
@IBOutlet private weak var veryStrongButton: UIButton!
|
|
|
|
// MARK: - View Lifecycle
|
|
|
|
override func awakeFromNib() {
|
|
super.awakeFromNib()
|
|
|
|
localizeUI()
|
|
}
|
|
|
|
// MARK: - Private
|
|
|
|
private func localizeUI() {
|
|
headerLabel.text = NSLocalizedString("main_feel", comment: "")
|
|
descriptionLabel.text = NSLocalizedString("manual_usebutton", comment: "")
|
|
mildLabel.text = NSLocalizedString("manual_mild", comment: "")
|
|
strongLabel.text = NSLocalizedString("manual_strong", comment: "")
|
|
veryStrongLabel.text = NSLocalizedString("manual_verystrong", comment: "")
|
|
}
|
|
|
|
override func layoutSubviews() {
|
|
super.layoutSubviews()
|
|
|
|
let labels: [UILabel] = [mildLabel, strongLabel, veryStrongLabel]
|
|
labels.forEach { (label) in
|
|
label.layer.borderWidth = AppTheme.shared.buttonBorderWidth
|
|
label.layer.borderColor = AppTheme.shared.buttonBorderColor.cgColor
|
|
label.layer.cornerRadius = AppTheme.shared.buttonCornerRadius
|
|
label.clipsToBounds = true
|
|
}
|
|
}
|
|
}
|