Hey buddy How's it going.
This is Caleb with slopes dot com and we are so close to being done with this app what I want to do
in this video is simply to run our project look through it and see you know where things could be improved
or made better.
And so then after that I'm going to go ahead and give you a challenge to actually improve and make the
app better.
So pull open your project and go ahead and just build and run it to an iPhone 8 plus or an iPhone 10
simulator that is.
And then we're going to go ahead and take a brief look at what it looks like.
So here we have our cells and the table view here is the exact height of our view controller or our
table view frame anyway.
And so what we can actually do is we can go ahead and rotate it and everything looks fine.
But like I mentioned in a previous video you might want to set it so that when the device rotates this
height or I guess height for each cell is updated depending on you know the actual height of the top
bar here because we just have it set to an explicit value.
Now if I select a cell it pulls open the way that you would expect that's great.
Now it's pulling open the same view controller every time.
All right.
Very cool stuff.
That looks great.
And if I rotate the device we can see the image.
And if we tap on that button it pulls it open in full screen.
OK.
Very very cool stuff.
Now I said I would have a challenge for you.
And here it is.
If you notice when I pull this open in full screen it still says Master which refers to the previous
name that the X code project gave us now.
It was a bit of a challenge for me to figure out how to do this so my challenge for you figure out how
to change this to say back or collapse or something other than Master find out where to change that
to customize it also.
Your challenge is to figure out how you can identify when the device rotates left or right an update
the height for each cell so that it actually fits just like it does when we are in portrait mode like
this.
Everything fits perfectly because we're dividing the frame of the table you subtracted by the navigation
bar height and then divided by the count of items can figure out a way to do that.
When the device rotates so you don't have this ugly white space at the bottom.
Your third challenge is going to be to take this app and instead of just displaying the same view controller
with different data what I want you to do is to try to create like a setting's profile app like if you
go into the settings app on iOS you'll see there are oh that's not good.
Looks like it doesn't like me huh.
OK.
There we go.
So in the Settings app there is a table view or multiple table views with cells here that go to different
view controllers right.
If you select one it loads you know the general settings and if you select another one it loads the
About page and if you select another one it loads the legal notices.
OK so I want you to go ahead and see if you can add multiple different types of controllers into your
app and also notice if you rotate the iPhone.
This is a UI split view controller.
So if I were to select general it would bring up the general settings if I were to select photos it
would bring up the photo settings.
So your job is to take the app that you just built and create a few different instances of your controller
and load them from the different table view cells not just the same visi.
So there's your challenge.
Fantastic work guys.
And you now have a great understanding of you eye view controllers and iOS.
Very cool stuff guys.
Super impressive work.
And I can't wait to see you in the next target topic.