Hi
I've set up a list UICollectionView with focus (without selectionFollowsFocus
as I must distinguish between focus and selection by tap)
Everything is working correctly, except I'm trying to setup the first cell as focused on startup, without the user having to use tab/down key initially.
I've tried:
- calling
setNeedsFocusUpdate()
andupdateFocusIfNeeded()
- setting 1st cell in
preferredFocusEnvironments
andindexPathForPreferredFocusedView
- setting
focusGroupPriority
to different values (even Int.max) directly on the cell
But initial focus is not set.
Enabling focus loop debugger correctly shows the 1st cell as the 'next' focused element, but I cannot figure out how to actually trigger it without external keyboard.
Thanks