The only interactive UIKit component so far is a button that displays a dummy date. Learn how to add some logic now that will allow the user to switch between different dates and the corresponding weather forecast with a simple click on the touch surface of the Siri Remote. Therefore, you also need to make sure that the correct date is displayed on the TV screen.
- At the moment we can display the weather forecast…for today but we already added a nice little button…that feels quite lonely at the moment…in the lower left corner here which we want…to use to step through let's say the next five days…and display the weather forecast for these next days.…To give that button a little bit more life,…let's go back into our YourLocationViewController.…And in our weather properties section at the top we're going…to add one more property that we're going…to call numberOfDayChanges which we set to zero.…
So a simple integer that we are going to use to indicate…and on which day of our five days…of forecast we are currently at.…And then we're scrolling down or using the jump bar…to go down to our nextDay button…or the IBAction that we already defined a while ago.…And here we are going to check.…If the numberOfDayChanges < 5, then what we want…to do is incrementing this number of DayChanges.…
And I'm going to make some more space here.…So let's enter some more lines here.…And now with these changes I'm going to update the UI…
- 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
What makes tvOS special?3m 35s
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.