I am trying to implement a fairly straightforward interface on tvOS, and after several failures it seems like this is not possible.
I have 2 types of horizontal scroll collection.
- 1st - cities
- 2nd - options
The set of options is the same for all cities, but some options may be disabled for some cities. At least one option is available for each city.
The user can select a city and an option for it, focusing on a specific cell. The current selection is displayed on the screen (see Collection Labels)

What I'm trying to do is remember the selected city / parameter, so when I change the option between the collection views, the previously selected item becomes focused (selected). This can be done using the flag remembersLastFocusedIndexPath fo UICollectionView , but ignore disabled cells in the collection view.
For example, in the attached project, Option 3 is disabled for Dublin . Therefore, if the user selects London , then selects Option 3 , then moves the focus back to the city collection view and changes the selection to Dublin , then Option 3 is disabled ( isUserInteractionEnabled is false and collectionView(_ collectionView:, canFocusItemAt indexPath:) returns false ). However, if remembersLastFocusedIndexPath true, the collection view ignores all these objects and tries to focus the disconnected item. At this point, the UI ob collection view "broke":

There is an indexPathForPreferredFocusedView(in:) method, but it only fires once for the preferred UICollectionView , although this is not obvious from the Apple documentation .
Is there a way to write βcustomβ logic to focus cells? What I need to implement to view the collection of parameters is to select the selected option, if it is available or available for the first option, if the selected parameter is disabled each time it receives focus . Subclassing UICollectionView should be a way to solve this problem, as it should not know about the data model.
Here you can download the test project.