From the course: Learning Apple tvOS App Development

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Set up shortcuts

Set up shortcuts

From the course: Learning Apple tvOS App Development

Start my 1-month free trial

Set up shortcuts

- [Instructor] I've already opened up the ServiceProvider class which is responsible for displaying the top shelf items that we want to create. This ServiceProvider class adopts the TVTopShelfProvider delegate and with that is coming a topShelfStyle computed property and a topShelfItems property which we're going to use here. So the topShelfStyle property can return to different styles. First of all, sectioned. This is the default that we're also going to use and the other style that is possible is inset that you can use if you want to use large images that almost cover the complete top shelf. So back to the sectioned version. In the topShelfItems property, here we're going to create everything that we really need for our two topShelfItems. As you can see the topShelfItems want us to return an array of TVContentItems and this is what we're going to do. So let's start with the Section itself. The section needs an identifier. So everything here in this topShelfItems property needs…

Contents