frenzy-ios/Reader/Screens/Home/HomeCollectionViewCell.swift

22 lines
593 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 = .appBackground
}
// todo: this breaks the deselection animation
self.backgroundConfiguration = backgroundConfig
}
}