OK, so how did you find that task?
Well, I've completed it here with basically three lines of code, but one important line and you'll
notice that I can't actually swipe this down.
I simply cannot dismiss it.
But if I do my usual rubbish and I register that person, it will disappear.
And how I've done that is I had to override the view.
Did load, first of all.
So this is a life-cycle call.
The View, the view controller that we're loading goes through lifecycle.
So first it gets called and then it gets initialized and then the view gets prepared and then the view
loads, but it isn't shown and then the view appears.
So at the point it loads.
I know I have everything available to me that a view controller can do, but it's not yet shown.
So before it shows, I get to say is modal in presentation.
Now, modal means it just pops up on the screen and there's no way to dismiss it unless I plumb that
in somehow.
And of course with our login register items, we've already plumbed that in.
So we don't need to do anything more and simply set that to true and then we can't actually swipe anything
away.
So that was the homework that was pretty simple.
If you got stuck, it's probably because you didn't use the right terminology on Google when you were
searching for this solution.
Now, what did I use here?
I use the words prevent view controller from dismissing.
And I got loads and loads of Google hits, some are old, some of the code didn't work because it is
that old, but someone said an iOS 13, we get this new popover view, the one that we're seeing within
our particular app.
And the way to stop it from swiping away is to just set that to true.
That's the easy way.
There are other ways of doing it, but we'll just do it the easy way.
Thank you very much.