Post

Replies

Boosts

Views

Activity

Reply to On iOS 17, UICollectionView updates trigger a resignFirstResponder call even when the cell with the text input is unaffected
The best workaround I have found is to disable UIView animations before performing the update and opening the keyboard again, but even with this, the keyboard blinks and typing isn't very smooth. UIView.setAnimationsEnabled(false) self.collectionView.reloadSections(myIndexSet) self.header?.searchBar.becomeFirstResponder() //we need to re-enable animations at some point. For a naive solute, just re-enable it after a short delay delay(0.2) { UIView.setAnimationsEnabled(true) }
Mar ’24