Kurdtvs-Live-Kurdish-TV-Kur.../Mastodon/Extension/UITableViewCell.swift

23 lines
506 B
Swift
Raw Normal View History

2021-07-05 10:07:17 +02:00
//
// UITableViewCell.swift
// Mastodon
//
// Created by MainasuK Cirno on 2021-7-5.
//
import UIKit
extension UITableViewCell {
/// The color of the cell when it is selected.
@objc dynamic var selectionColor: UIColor? {
get { return selectedBackgroundView?.backgroundColor }
set {
guard selectionStyle != .none else { return }
let view = UIView()
view.backgroundColor = newValue
selectedBackgroundView = view
}
}
}