Files
eqn.ios/Sources/Earthquake Network/Controllers/Alerts/Cells/AlertsPastEartquakesTableViewCell.swift
T
2020-10-08 21:36:28 +02:00

42 lines
982 B
Swift

//
// AlertsPastEartquakesTableViewCell.swift
// Earthquake Network
//
// Created by Busi Andrea on 04/10/2020.
// Copyright © 2020 Earthquake Network. All rights reserved.
//
import UIKit
class AlertsPastEartquakesTableViewCell: EQNBaseTableViewCell {
@objc var smartphoneNetwork: EQNReteSmartphone? {
didSet {
updateUI()
}
}
@objc var onTapMapButton: (() -> Void)?
// MARK: - Internal
@IBOutlet private weak var last24hLabel: UILabel!
@IBOutlet private weak var from2013Label: UILabel!
@IBOutlet private weak var mapButton: UIButton!
// MARK: - Private
private func updateUI() {
guard let smartphoneNetwork = smartphoneNetwork else { return }
last24hLabel.text = smartphoneNetwork.eq;
from2013Label.text = smartphoneNetwork.eq_p;
}
// MARK: - Actions
@IBAction func mapTapped(_ sender: UIButton) {
onTapMapButton?()
}
}