Now your user interface is only filled with dummy data and the video background is only able to play one video. That is what you are going to change now. With the information from the OpenWeatherMap API, you can move forward to populate the different UIKit components with life. To test the app and to see different weather conditions, you are also going to change the Apple TV simulator’s location.
- By now, we can get the users location…we can get the weather information…for this location.…But what we cannot do is display…this information to our users.…So let's change that right now…and therefore I have already created…a new section in my code.…In your location you controller dot swift…and in line 160 I'm going to create a new function…to update the user interface.…This is going to get one parameter…which is going to be an integer.…
Since we're using that to access our array…and update the user interface…depending on the current selected date.…So with that function in place…let's create a weather object and access our weather array…and use our index to access the correct element.…And with this object ready we can…now actually start updating our user interface.…User interface updates should always…take place in the main thread.…So let's use DispatchQueue main async…Also let's use weak self to access…everything to prevent retained cycles.…
And we need to make sure that everything…is happening on the main thread…
- 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.