Search code examples
iosswifttvos

TVOS about App layout (Like in iTunes and similar)


I have played a lot with my app and I do not understand how to make layout like in for example iTunes (also many apps uses it).

  1. How it is made? It is one big CollectionView, but with special Flow or it is TableView with many CollectionView?

enter image description here

  1. Collection headers. In iTunes App if I select item (with adjustImageWhenFocused) under the header then the header will jump up and the item will not overlap the header. It is special magic or it is system behavior and I just do know how to use it?

Below is two screenshots about what I am trying to tell you and example with my app.

itunes app example my app example

  1. In iTunes there are movie preview page. With what type of View it is made? TableView,CollectionView or just ViewController with ScrollView?

itunes moview preview screen

I have read many sources and looked up demo projects, but nowhere I have found answers for this questions.


Solution

  • 1) I think it would be a stackTemplate containing a couple collectionLists.

    2) AFAIK the headers "jump up" on their own, no need to prepare anything special.

    3) productTemplate?

    For examples, see https://github.com/iBaa/PlexConnectApp, /TVMLTemplates/Default/Movie_OnDeck.xml (1) or Movie_PrePlay.xml (3).

    Or check the gold source: https://developer.apple.com/library/tvos/documentation/LanguagesUtilities/Conceptual/ATV_Template_Guide/StackTemplate.html, plus other Templates.