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
Any ideas how to work around this? In the original situation we have a search bar as part of the scrollable area, but remaining at the top of the screen as the user scrolls down. This sticky header is implemented through a simple UICollectionViewFlowLayout subclass. I thought I would patch the issue by replacing the header with a placeholder view with the actual header placed separately on top of it tracking the position, but I'm stuck with two different issues depending on how exactly I do this. If I add the real header as a subview to the collection view, it again gets wiped by the content update. It seems like this iOS 17 bug is affecting any non-cell subviews with an active first responder? If I add the real header separate from the collection view, the layout works, but the user cannot scroll touching the header view, and I can't figure out a way to pass the touches to the collection view while still allowing interaction with the view itself. The most promising avenue seemed to be overriding touchesBegan and the four other related methods, but capturing the events there and passing them to other views appears to do nothing.
Dec ’23