You are going to use the Top Shelf items to give your users two shortcuts to reach the different app features more quickly. In order to process the selection of a Top Shelf item you need to make some adjustments to both the Info.plist and your apps AppDelegate class. Communication between the TV Service Extension and the main tvOS application is managed by using URL schemes.
- [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 actually an identifier.…So let's start with a sectionID.…
- The Siri remote
- The focus model
- Adding video assets and imagery
- UIKit components
- Location services
- Accessing a Web API
- Enabling the top shelf and layered images
- Setting up shortcuts
- Communicating with URL schemes
- Adding a layered app icon
Skill Level Beginner
1. Introducing tvOS Development
2. Your First tvOS App: Build the UI
3. Your First tvOS App: Add the Logic
4. Multipeer Connectivity
5. Final Touches
Next steps1m 18s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.