So I'll come again in business and really learn how to use a new ice which is a very simple lesson and
you will get there in a matter of minutes.
So this jump into school.
In here I'm going to close this project and start a new one called it my reach app
as you can imagine in my switch out in the storyboard.
I'm going to go ahead and I with a switch which is this guy that you can actually tap it on or off.
And then let's have a label that we can see the result of which is again very simple.
You have done many many times by now.
And here is my label on my label is going to have a line center on that gun that is bluish like that
and I'm going to go to mass this Sunday or I'm rushing through these because I know you know how to
do them and you know these are repetitious Smiler.
So the first thing in here I'm going to add an action to it.
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
Crizal label and then I'm going to go to that H Queechy view.
I have an action and I have a prop..
Let's go to that.
Am I that am I'm going to see that in my view draw.
I'm not going to do anything in here.
I'm going to do something.
So the first thing I'm doing here is that I'm going to get the UI switch from the center.
So I'm going to say you guys switch.
This switch is Senderos.
And then I'm going to cost send there into a few I switch.
Actually I either need that last Franz's so I'm going to for Sunday or to be considered a new ice age.
Remember we did that in the past.
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
completely change the ID to be a switch and that's going to be correct at all times anyway.
But because the default behavior is ID I'm going to keep it like this.
The next thing I'm going to do is this.
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
easier and that results labeled that text is saying it's on else it's going to say results later that
text is going to be it's off.
And that's about that.
That's all we had to do for this one to our to be able to change the switch from one way to another
one and now solve and now it's size.
And so on.
And if you want you can actually change the status of the switch manually using your code.
So to do that I need to go to my main storyboard and I need to go to my assistant editor.
I have to look at that age and I have to give an outlet to this.
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
things on it such as what.
Such as.
I'm not going to do this I'm just going to show it to you.
You could say my switch set on true and you made it true.
So you could call a method that actually sets a switch to be on or false.
You can you know if you want to turn it off.
So if you had the reason that this switch had to be turned off by some other or you know of value or
outlet you could use this method to turn it on or off.
I'm doing it now and you did a lot.
So we kind of want to be able to see the animated part of it because the moment the application loads
it happens really really quickly.
But if it did this using a button or something we could actually see it being animated.
So that's about that.
Like I promised.
Short and sweet.
I hope sweet short for sure sweet.
I leave it to you.
And that's how you switch.