1
00:00:01,150 --> 00:00:08,720
So I'll come again in business and really learn how to use a new ice which is a very simple lesson and

2
00:00:08,730 --> 00:00:11,160
you will get there in a matter of minutes.

3
00:00:11,160 --> 00:00:13,250
So this jump into school.

4
00:00:13,590 --> 00:00:21,930
In here I'm going to close this project and start a new one called it my reach app

5
00:00:25,600 --> 00:00:28,880
as you can imagine in my switch out in the storyboard.

6
00:00:28,900 --> 00:00:36,530
I'm going to go ahead and I with a switch which is this guy that you can actually tap it on or off.

7
00:00:36,670 --> 00:00:42,440
And then let's have a label that we can see the result of which is again very simple.

8
00:00:42,460 --> 00:00:44,810
You have done many many times by now.

9
00:00:45,220 --> 00:00:54,100
And here is my label on my label is going to have a line center on that gun that is bluish like that

10
00:00:54,130 --> 00:00:58,900
and I'm going to go to mass this Sunday or I'm rushing through these because I know you know how to

11
00:00:58,900 --> 00:01:01,990
do them and you know these are repetitious Smiler.

12
00:01:02,170 --> 00:01:05,740
So the first thing in here I'm going to add an action to it.

13
00:01:05,740 --> 00:01:15,580
Call it my switch action and then I'm going to have a label and I'm going to call it there's a label

14
00:01:16,390 --> 00:01:20,360
Crizal label and then I'm going to go to that H Queechy view.

15
00:01:20,380 --> 00:01:23,190
I have an action and I have a prop..

16
00:01:23,200 --> 00:01:24,070
Let's go to that.

17
00:01:24,100 --> 00:01:29,520
Am I that am I'm going to see that in my view draw.

18
00:01:29,590 --> 00:01:31,990
I'm not going to do anything in here.

19
00:01:31,990 --> 00:01:33,460
I'm going to do something.

20
00:01:33,570 --> 00:01:39,680
So the first thing I'm doing here is that I'm going to get the UI switch from the center.

21
00:01:39,830 --> 00:01:42,540
So I'm going to say you guys switch.

22
00:01:42,760 --> 00:01:46,460
This switch is Senderos.

23
00:01:46,990 --> 00:01:52,030
And then I'm going to cost send there into a few I switch.

24
00:01:52,070 --> 00:01:58,900
Actually I either need that last Franz's so I'm going to for Sunday or to be considered a new ice age.

25
00:01:58,900 --> 00:02:01,130
Remember we did that in the past.

26
00:02:01,180 --> 00:02:07,270
If your send there is ID but you know it is of the type of choice which you can do it is or you could

27
00:02:07,270 --> 00:02:13,500
completely change the ID to be a switch and that's going to be correct at all times anyway.

28
00:02:13,660 --> 00:02:17,540
But because the default behavior is ID I'm going to keep it like this.

29
00:02:17,560 --> 00:02:19,120
The next thing I'm going to do is this.

30
00:02:19,150 --> 00:02:27,670
I'm going to say if this switch Dart is on it means if it is in the on the move I mean it couldn't get

31
00:02:27,670 --> 00:02:39,200
easier and that results labeled that text is saying it's on else it's going to say results later that

32
00:02:39,640 --> 00:02:43,860
text is going to be it's off.

33
00:02:44,200 --> 00:02:45,580
And that's about that.

34
00:02:45,580 --> 00:02:53,140
That's all we had to do for this one to our to be able to change the switch from one way to another

35
00:02:53,140 --> 00:02:56,160
one and now solve and now it's size.

36
00:02:56,290 --> 00:02:56,770
And so on.

37
00:02:56,800 --> 00:03:04,630
And if you want you can actually change the status of the switch manually using your code.

38
00:03:04,720 --> 00:03:09,390
So to do that I need to go to my main storyboard and I need to go to my assistant editor.

39
00:03:09,520 --> 00:03:13,320
I have to look at that age and I have to give an outlet to this.

40
00:03:13,450 --> 00:03:22,510
So I'm going to call it my switch so my switch now has a property that I have it in here and I can do

41
00:03:22,510 --> 00:03:24,540
things on it such as what.

42
00:03:24,550 --> 00:03:25,170
Such as.

43
00:03:25,240 --> 00:03:27,650
I'm not going to do this I'm just going to show it to you.

44
00:03:27,670 --> 00:03:34,920
You could say my switch set on true and you made it true.

45
00:03:35,140 --> 00:03:41,560
So you could call a method that actually sets a switch to be on or false.

46
00:03:41,560 --> 00:03:43,770
You can you know if you want to turn it off.

47
00:03:43,770 --> 00:03:51,540
So if you had the reason that this switch had to be turned off by some other or you know of value or

48
00:03:51,550 --> 00:03:55,100
outlet you could use this method to turn it on or off.

49
00:03:55,150 --> 00:03:57,030
I'm doing it now and you did a lot.

50
00:03:57,040 --> 00:04:02,870
So we kind of want to be able to see the animated part of it because the moment the application loads

51
00:04:02,870 --> 00:04:05,060
it happens really really quickly.

52
00:04:05,170 --> 00:04:10,460
But if it did this using a button or something we could actually see it being animated.

53
00:04:10,750 --> 00:04:11,860
So that's about that.

54
00:04:11,860 --> 00:04:13,350
Like I promised.

55
00:04:13,360 --> 00:04:14,290
Short and sweet.

56
00:04:14,330 --> 00:04:16,760
I hope sweet short for sure sweet.

57
00:04:16,990 --> 00:04:18,050
I leave it to you.

58
00:04:18,300 --> 00:04:19,670
And that's how you switch.
