var background = UIBackgroundConfiguration.listGroupedCell().updated(for: state)
background.cornerRadius = 25
// Update background based on selection state
if state.isSelected {
background.backgroundColor = .systemBlue.withAlphaComponent(0.3)
background.strokeColor = UIColor.systemBlue
background.strokeWidth = 1.5
} else {
background.backgroundColor = isHoveredOver ? .hoverHighlightBackground : .background
background.strokeColor = UIColor.borderColor
background.strokeWidth = 1
}
backgroundConfiguration = background
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: