TVCollectionViewFullScreenLayout

Hi,

I'm having an issue with TVCollectionViewFullScreenLayout. The requirement is that a user can pick from a collection view of items which then presents a new ViewController with a UICollectionView using TVCollectionViewFullScreenLayout populated with cells derived from TVCollectionViewFullScreenCell, with the initial position set to the same item the user selected.

Calling collectionView.scrollToItemAt initially works but then it snaps back one position to the previous cell. Simply adding one to the index position leaves the user with an ugly animation as the view loads and then scrolls to the correct position.

I investigated the .centerIndexPath property but this is get only.

An example of the correct behaviour can be found in the TV app when selecting a title from a horizontal list of suggestions. The view that is presented starts with the item the user selected.

Any luck with this? I have a same problem and I can not figure it out :(

I use this
Code Block
override func indexPathForPreferredFocusedView(in collectionView: UICollectionView) -> IndexPath? {
      return desiredIndexPath
}

It scroll to the desired index path, but  it snaps back one position to the previous cell. It's probably because of the focus engine, but I don't know how we can control it.

Have you found any solution, workaround or fix for this issue? I'm having the same issue and I've not found any way to make it work, making the whole solution useless!

Please Apple engineers, could you please let us know how to set the initial selected index when dealing with a TVCollectionViewFullScreenLayout?

Thanks.

Issue reported to Apple with the Feedback Assistant: FB9650519.

TVCollectionViewFullScreenLayout
 
 
Q