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

Forecast for more than one day

From the course: Learning Apple tvOS App Development

Start my 1-month free trial

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…

Contents