Come back again on this list then they're going to talk about the delegate method of a school of you.
And there's so many of them and they do a lot of different things for us.
So it really helps if you get some sort of familiarity with what is available to you.
So let's going to school.
I mean you know I'm going to start a new application called school your they get methods and my delegate
matters like always I'm going to have one scroll of you in my storyboard so you know I'm going to go
ahead and say Give me a you scroll view that U.S.-Korea I'm going to place it somewhere in here.
Is has a different background color such as that one and it has the full constrains as of.
Again none of these are mandatory.
You don't have to have these particular ones.
It helps to have some sort of constraints.
So in here I'm going to add an outlet for it so that outlet is going to be my escrowed of you.
So in here I'm going to call it my scroll view within the outlets and connect and that's all I have
to do in here.
The school back to us woofed fine.
I mean here the first thing I want to do is I want to sit.
It's the height of the content size of it.
A little bit larger.
So you can actually scroll it.
So I'm going to say my school the art in the view with the art content size becomes CGI size of the
values I want to give it are these I want to say there is 600 and the height is 1800 or something like
that something that is really large and makes the scroll of you scroll essentially.
So now they have that.
I'm going to have to use the delegate method and to do that I'm going to say my score of you delegates
to here and that is a you I ask all of you delegates protocol.
So I'm going to say delegate yourself I'm going to use the protocol called you by a score of your delegates
for the golden year.
I know I have access to a whole host of different methods that they can use for a scrolling.
For instance I could go in here and say there is a method in the delegate that tells me when something
is scrotes.
So this is going to be called.
It's cruel of you.
Let me find it.
Did a scroll.
So that's the one that I want to use the very first one.
I mean you know I'm not going to really do anything.
I'm just going to print it.
I'm going to say prints.
They want to print is actually this title because there's going to be a few of them and I don't want
to waste a lot of time on it.
So the first one is this when this all the schools are going to print that for me.
Let's see what that is.
We have a scroll of you we have to begin dragging.
We did and try again.
I'm guessing some somewhere did end decelerating which is actually a very useful one because it tells
us that it does sort of ration has ended on the of you has a stop essentially and then let me use a
few of them.
I'm going to say it is a did and dragging this the one that we use here.
And the dragon does someone that use their ends dragging the scroll of you.
I tells us that it actually happened so I'm going to copy that say S-curve you did and dragonets one
and one that was another one which is essentially telling me when they use that is about to begin dragging.
So his call will begin dragging.
And in here of course I'm going to go ahead and print the same thing a scroll view will begin dragging.
Now pay attention that some of these methods such as score review did a screw or even begin dragging.
They don't have any arguments.
They only know which scroll view you're asking for.
And since I only have one scroll of view I don't really care about that part.
However this other one for instance has an argument built into it that says decelerates bullion van
the dragging is ending.
Is it going to decelerate or not.
So I'm actually going to go out a little statement and say if it is decelerating it is about to a stop
let's just print is slowing down slowing down.
So that's the all of is in practice I'm going to run the application and once I run it I should be able
to see every time I scroll.
Every time I begin writing as well as every time I enter.
So let's have my Castleview up here a little bit longer let's clear everything in it.
I'm going to go in here and I'm going to tap and write and it says school you really begin dying.
That was the first thing that happened.
Let's see it again.
A tap and I did a little bit.
It says the school of you will begin writing and then it says it's going to get a scroll because as
long as on the scoring that is going to be printing and then it's going to say a score of you did.
And the dragging that happened right at the end.
So far we haven't seen that deceleration.
Let's see how we can investigate that.
We're going to use it like that and hear something in between.
I saw deceleration happening is slowing down that seat once again.
Look at the mouse movement that I produce or the top room and I drag and I let go I can let's go on
Sunday in the middle.
The moment they let go because I'm just stopping the dragging.
It says Well from this point on we will decelerate.
It's slowing down now.
Now keep in mind that this doesn't mean the score of you has finished because as you can see I see this
slowing down.
We still have this scroll of your Discordian school disco discord.
This isn't the end of the process of the scrolling.
So for instance if you wanted to know the score you ended scrolling.
And that's called that decelerating.
So when it is decelerating it's music this is slowing down and of the ends of the celebrating.
It means that they're stopped.
I'm going to type that in here and say it's as now.
It's right again.
And that's the end of the dissertation and sometimes it becomes important that you want to know when
you're user ends using the scroll.
So I'm going to clear everything out say a scroll and now the very end.
It's stopped.
So once again if I like just a little bit and then the moment it stops it says this stopped again this
way all the way.
It says it has stopped now.
So up until this point it was still moving just a tiny bit.
So that's an introduction on how to use the score view delegate method.
There's so many many of them.
I actually recommend that you have a look at the header file in here.
Here jump to the finish line.
And in here I'm going to say all the delegate matters are here.
We'll begin this aerating deed and decelerating S-curve you did.
And the dragging is all you.
Get an animation.
I'm not sure what does that one do.
It says call Kalt when the content of said the score of your visit with an inmate that finishes.
So that's when we actually run an animation on it.
That's something I'm going to show you in another lesson but I didn't know that there is a there's a
delicate metal to know when God has finished.
So that's interesting I'll try to embed this into the upcoming lesson as well.
And then for resuming we'll see it in the next lesson.
And there's so many other ones in here so it really helps if you have a look at these and get to at
least familiarize yourself with what is possible.
Not necessarily.
You're not going to use them in the next you know application or so but it helps if you know they actually
exist.
So with that in mind this movement for zooming in on next lesson.