So can I gain.
This lesson is about adding a slider to your apps similar to you I switch.
This is going to be a very simple project as well.
So let's jump into ex-cult in here I'm going to start a new project single view application the slider
app is only a few things that one needs to learn about the Sneider.
So the first thing is I'm going to go Ptomaine to the storyboard.
I'm going to add this slider.
So this is a slider on a slide as they can have different vits to them on a slide.
They have minimum and maximum and Crans values and these are other settings here for changing the looks
of them but for me I'm only going to worry about 0 to 1 Sorry 0 to 100 and the current value is a 50.
So it's some sort of like percentage a slider for me and then I'm going to have a label that shows me
the result of my slider.
I'm going to have that label in here.
And like always I'm going to go with a different background color so I can actually see it.
And that's about that.
Now what they need is essentially one method and one outlet.
So that's got to Assistant Director load up my H in my age.
I'm going to go ahead and say this is let's call it let's slide it.
This is my action.
Let's slide that action and then I'm going to have a label that is called the label as I usually call
it.
So that's about that.
That's all I have to do now when I move on to my ARE NOT am in my method.
I'm going to say resonate when the text comes.
Let's get our slide there which is from the center there.
You remember that.
So I'm going to say you lie a slider of sender dot value and that's a float value also if you want to
pretend that text you have to get on a string from it.
And then I say that's a string string with formats.
What ever floats that you find in this neither.
And that's about that's and we can run our application now.
Keep something in mind that when we made our action automatically through the assistant editor it actually
connected the two value changed.
So every time in here value changed every time the horizontal slider changes its value then that's it
we will get a new trigger of our function.
So let's see perfect we can see it all there.
And as you probably remember from the past we can format this flawed to show us let's say only two decimal
points or two decimal places.
So if I want to see only two of them I put a point or two in there.
And now we only see point two of them.
There is one more thing that I want to mention and that kind of from time to time has become useful
for me and that is what I don't want to constantly see the results.
What I want to see it only when I finish sliding.
What if I don't want to see these changes now until I let go.
And in here I want to see if there is a property for all the sliders which is called up.
It is continuous or is continuous.
So it is funny in here it says continuous updates so you can turn it off and now you feel really good
on it.
Now we should see without that constant change after you and I let go.
It shows me that is when I let go.
It shows me when I let's call it shows.
Perfect.
So that's about that.
Like I said there's going to be a very short and a very simple up and when we slide it the value changed
to get the slider you get less value become 32 to place this small floating value.
And we make an interesting out of it and we show it in our label.
So on CNN Expressen.