Files
2022-06-03 16:55:25 +03:00

43 lines
1.2 KiB
Swift

//
// CryptoChatCellChat.swift
// Wallet
//
// Created by Saveliy Stavitsky on 8/18/20.
// Copyright © 2020 List. All rights reserved.
//
import UIKit
class CryptoChatCellChat: UITableViewCell {
@IBOutlet var titleLabel: UILabel!
@IBOutlet var titleShortLabel: UILabel!
@IBOutlet var descriptionLabel: UILabel!
@IBOutlet var timeLabel: UILabel!
@IBOutlet private var countButton: CommonButtonAction!
override func awakeFromNib() {
super.awakeFromNib()
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
func setUnread(count: Int?) {
if let count = count, count > 0 {
countButton.isHidden = false
countButton.setTitle("\(count)", for: .normal)
titleLabel.font = UIFont.font(style: .bold, size: 16)
timeLabel.font = UIFont.font(style: .bold, size: 14)
} else {
countButton.isHidden = true
countButton.setTitle("", for: .normal)
titleLabel.font = UIFont.font(style: .regular, size: 16)
timeLabel.font = UIFont.font(style: .regular, size: 14)
}
}
}