After updating to tvOS 18 I've noticed the following change in focus behavior:
When a UICollectionView
is located next to any other view (even one with user interaction disabled), attempting to move focus within the collection view in that view's direction to a next collection view item, which is currently outside of the visible area, doesn't have any effect.
Like if the focus engine preferred to move focus to that other view (despite it being not focusable) over a currently hidden collection view cell.
This didn't happen in tvOS 17 and earlier.
A minimal reproducible project can be found here.
Steps to reproduce:
- Launch the app on a tvOS 18 device.
- Swipe right and observe that focus moves without issues.
- Swipe left and observe that in most cases focus doesn't move to items beyond the visible area due to an empty grey view located to the left from the collection view.
- Compare to the same app running on tvOS 17 and observe that focus moves both sides without issues.
The issue is reproducible on Xcode versions 16.0 (16A242d) and 15.4 (15F31d).
Did anyone face the same issue and/or has suggestions on a possible fix?