26 lines
693 B
Swift
26 lines
693 B
Swift
//
|
|
// HomeCollectionViewCell.swift
|
|
// Reader
|
|
//
|
|
// Created by Shadowfacts on 1/9/22.
|
|
//
|
|
|
|
import UIKit
|
|
import Fervor
|
|
|
|
class HomeCollectionViewCell: UICollectionViewListCell {
|
|
|
|
#if !targetEnvironment(macCatalyst)
|
|
override func updateConfiguration(using state: UICellConfigurationState) {
|
|
var backgroundConfig = UIBackgroundConfiguration.listGroupedCell().updated(for: state)
|
|
if state.isHighlighted || state.isSelected {
|
|
backgroundConfig.backgroundColor = .appCellHighlightBackground
|
|
} else {
|
|
backgroundConfig.backgroundColor = .appBackground
|
|
}
|
|
self.backgroundConfiguration = backgroundConfig
|
|
}
|
|
#endif
|
|
|
|
}
|