How to update UIConfigurationState from CollectionView using UIConfigurationStateCustomKey

is there anybody using UIConfigurationStateCustomKey to manage custom state for cells?

I want to know if that would be possible to update from the collection view, it’s like UICollectionView.select(indexPath) seems like there is no way for this though.

currently UICollectionView (UITableView) can manage is-selected for cells. but provided official property are only available.

if we need something another custom properties that describes the cell’s state, we might need make state manager for cells.

I was wondering how UIConfigurationStateCustomKey works for us for such case. According to the documentation, we can update the custom state from only visible cell. so we can not update currently hidden cell’s state. https://developer.apple.com/documentation/uikit/uiconfigurationstatecustomkey

How to update UIConfigurationState from CollectionView using UIConfigurationStateCustomKey
 
 
Q