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.
Forecast for more than one day
From the course: Learning Apple tvOS App Development
Forecast for more than one day
- 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Demo API and some helpers3m 29s
-
(Locked)
A video background11m 8s
-
(Locked)
Set up location services8m 36s
-
(Locked)
Handle location updates4m 42s
-
(Locked)
Get weather data for the user's location6m 23s
-
(Locked)
Update the UI with weather data6m 30s
-
(Locked)
Forecast for more than one day6m 43s
-
(Locked)
Text entry on tvOS: Search for locations6m 34s
-
(Locked)
TableViews on tvOS5m 11s
-
(Locked)
UISplitViewController in action7m 23s
-
(Locked)
-
-
-