23 lines
628 B
Swift
23 lines
628 B
Swift
//
|
|
// HomeCollectionViewCell.swift
|
|
// Reader
|
|
//
|
|
// Created by Shadowfacts on 1/9/22.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class HomeCollectionViewCell: UICollectionViewListCell {
|
|
|
|
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
|
|
}
|
|
|
|
}
|