ios - UICollectionView steals focus -
i have uicollectionview header, cells , footer supplementary views. header contains uisearchbar. if type search field, keyboard automatically dismisses after first letter. think caused -searchbar:textdidchange:, contains code refreshing collection view (via -reloaddata, because method know works).
my theory is, reloading uicollectionview causes become first responder, somehow not work.
i have line in output every time keyboard dismisses:
setting first responder view of collection view don't know type (cell/header/footer) i attempted overwrite uicollectionview's -canbecomefirstresponder, unfortunately didn't work.
any ideas how can prevent uicollectionview become first responder after reload?
i've had luck restoring search bar first responder after updating table view:
collectionview.reloaddata() searchbar.becomefirstresponder()
Comments
Post a Comment