1
00:00:07,100 --> 00:00:08,260
Hey buddy How's it going.

2
00:00:08,260 --> 00:00:14,050
This is Caleb with slopes dot com and we are so close to being done with this app what I want to do

3
00:00:14,050 --> 00:00:20,350
in this video is simply to run our project look through it and see you know where things could be improved

4
00:00:20,440 --> 00:00:22,160
or made better.

5
00:00:22,330 --> 00:00:26,830
And so then after that I'm going to go ahead and give you a challenge to actually improve and make the

6
00:00:26,830 --> 00:00:27,730
app better.

7
00:00:27,730 --> 00:00:33,160
So pull open your project and go ahead and just build and run it to an iPhone 8 plus or an iPhone 10

8
00:00:33,730 --> 00:00:35,080
simulator that is.

9
00:00:35,200 --> 00:00:40,710
And then we're going to go ahead and take a brief look at what it looks like.

10
00:00:40,750 --> 00:00:47,170
So here we have our cells and the table view here is the exact height of our view controller or our

11
00:00:47,170 --> 00:00:49,080
table view frame anyway.

12
00:00:49,180 --> 00:00:54,500
And so what we can actually do is we can go ahead and rotate it and everything looks fine.

13
00:00:54,580 --> 00:00:59,950
But like I mentioned in a previous video you might want to set it so that when the device rotates this

14
00:01:01,300 --> 00:01:07,360
height or I guess height for each cell is updated depending on you know the actual height of the top

15
00:01:07,360 --> 00:01:10,220
bar here because we just have it set to an explicit value.

16
00:01:10,240 --> 00:01:15,580
Now if I select a cell it pulls open the way that you would expect that's great.

17
00:01:15,610 --> 00:01:18,890
Now it's pulling open the same view controller every time.

18
00:01:18,910 --> 00:01:19,590
All right.

19
00:01:19,810 --> 00:01:21,320
Very cool stuff.

20
00:01:21,610 --> 00:01:22,310
That looks great.

21
00:01:22,330 --> 00:01:27,300
And if I rotate the device we can see the image.

22
00:01:27,310 --> 00:01:30,750
And if we tap on that button it pulls it open in full screen.

23
00:01:30,910 --> 00:01:31,590
OK.

24
00:01:31,810 --> 00:01:33,220
Very very cool stuff.

25
00:01:33,220 --> 00:01:35,420
Now I said I would have a challenge for you.

26
00:01:35,470 --> 00:01:36,530
And here it is.

27
00:01:36,640 --> 00:01:43,120
If you notice when I pull this open in full screen it still says Master which refers to the previous

28
00:01:43,120 --> 00:01:44,940
name that the X code project gave us now.

29
00:01:44,970 --> 00:01:50,140
It was a bit of a challenge for me to figure out how to do this so my challenge for you figure out how

30
00:01:50,140 --> 00:01:56,020
to change this to say back or collapse or something other than Master find out where to change that

31
00:01:56,020 --> 00:01:57,890
to customize it also.

32
00:01:58,090 --> 00:02:04,870
Your challenge is to figure out how you can identify when the device rotates left or right an update

33
00:02:04,930 --> 00:02:10,720
the height for each cell so that it actually fits just like it does when we are in portrait mode like

34
00:02:10,720 --> 00:02:11,130
this.

35
00:02:11,140 --> 00:02:17,410
Everything fits perfectly because we're dividing the frame of the table you subtracted by the navigation

36
00:02:17,410 --> 00:02:22,190
bar height and then divided by the count of items can figure out a way to do that.

37
00:02:22,210 --> 00:02:25,800
When the device rotates so you don't have this ugly white space at the bottom.

38
00:02:25,870 --> 00:02:32,260
Your third challenge is going to be to take this app and instead of just displaying the same view controller

39
00:02:32,440 --> 00:02:38,320
with different data what I want you to do is to try to create like a setting's profile app like if you

40
00:02:38,320 --> 00:02:43,910
go into the settings app on iOS you'll see there are oh that's not good.

41
00:02:43,960 --> 00:02:46,290
Looks like it doesn't like me huh.

42
00:02:48,400 --> 00:02:48,710
OK.

43
00:02:48,740 --> 00:02:49,460
There we go.

44
00:02:49,470 --> 00:02:55,970
So in the Settings app there is a table view or multiple table views with cells here that go to different

45
00:02:55,970 --> 00:02:56,930
view controllers right.

46
00:02:56,930 --> 00:03:02,360
If you select one it loads you know the general settings and if you select another one it loads the

47
00:03:02,360 --> 00:03:05,590
About page and if you select another one it loads the legal notices.

48
00:03:05,780 --> 00:03:11,330
OK so I want you to go ahead and see if you can add multiple different types of controllers into your

49
00:03:11,330 --> 00:03:14,320
app and also notice if you rotate the iPhone.

50
00:03:14,360 --> 00:03:16,130
This is a UI split view controller.

51
00:03:16,130 --> 00:03:21,980
So if I were to select general it would bring up the general settings if I were to select photos it

52
00:03:21,980 --> 00:03:23,540
would bring up the photo settings.

53
00:03:23,690 --> 00:03:30,530
So your job is to take the app that you just built and create a few different instances of your controller

54
00:03:30,770 --> 00:03:34,890
and load them from the different table view cells not just the same visi.

55
00:03:34,910 --> 00:03:36,210
So there's your challenge.

56
00:03:36,230 --> 00:03:37,730
Fantastic work guys.

57
00:03:37,730 --> 00:03:42,560
And you now have a great understanding of you eye view controllers and iOS.

58
00:03:42,590 --> 00:03:43,860
Very cool stuff guys.

59
00:03:43,880 --> 00:03:45,130
Super impressive work.

60
00:03:45,140 --> 00:03:48,260
And I can't wait to see you in the next target topic.
