Right, so let's discuss exactly what all these files are and folders, first of all, we can ignore
these products folder.
Just leave that alone for now.
What we're interested in is this screen torch folder, which is the name of our application.
The very first thing that we need to know about is this file called the app delegate.
And if you go ahead and click that, then you'll see we get a bunch of code, a bunch of functions inside
of a class called App Delegate.
Don't worry about what these things are, but basically this is how the system communicates with your
application.
So, for example, if your application is about to be backgrounded or about to be killed by the system
because it's consuming too many resources, then app delegate will be informed.
Now, there's a bit more to it than that.
But that's the basic idea of an app delegate.
The app delegate also connects.
Let's say you want to play music.
It connects out to the system so the system knows which music you want to play.
It can hand over the playback and job done.
That's one thing I love about programming for iOS as opposed to Android.
There are little things like that, like here's a track, just go ahead and play it that it just takes
all the load off your hands and iOS just does the work for you.
It just works.
It's true.
Well, it just works is our famous last words, aren't they.
It doesn't always just work.
Right.
So that's the app delegate.
Now we have the scene at Delegate and because this has the word delegate in it, this takes care of
all the communication between what's happening in your scene, i.e. on the screen and this system and
the app delegate.
So that's basically what this does.
And if you look at the names of these functions, we have a scene did disconnect or a scene became active,
i.e. it was shown or a scene will resign active.
So they're very specialized.
What we call hooks in this, the hooks allow us to be notified when these particular things happen.
So, for example, if you've got a little game and it's going backgrounded, you might want to save
the player data and pause the game.
And this is kind of where you would do that, right?
So that's gone over to one side.
That's basically how we're communicating with the system.
Now, the view controller controls the view, right?
It inherits.
If you've taken my basic shift course, which I hope you have from the UI view controller, user interface
view controller, this is in charge of controlling the view and nothing else.
But but people often put a lot of code in The View controller, myself included.
And for the purposes of teaching you how to code on iOS, I kind of have to.
Otherwise, things get very convoluted, very fast.
So just bear in mind, if you're taking a beginner course, such as this first part, then what you
see is correct code, but it may be in the wrong place.
It's not quite refracted into the correct locations.
If you want to see that kind of thing, then search for I am Dev, build it be you I ldi it all.
One word in those particular courses.
I go through every app step by step without preplanning it so you can get a real feel for how we structure
code.
So that's the view controller if you controller controls in this case the main storyboard.
So this at the moment is a blank screen.
But if I click the blank screen, we get this little pop up at the side here and I'm sorry these things
are so tiny, but Apple, with all of their accessibility rules for apps, will not give you accessibility
in X code.
So I can't increase the font of these.
The only fonts I can increase are over on the far left hand side and the main font for code.
Would you believe it?
I mean, it really missed the target sometimes anyway.
That's how storyboard.
So that's the main screen controlled by the View controller.
Then we have this little folder called Assets Dot XY assets.
This is where will store images, icons and things like that, which we're not touching right now.
We have another storyboard, a launch screen storyboard, and as you'd imagine, this is what shows
when the user launches your app.
And finally, we have an info dot, please look at that tiny, tiny, tiny font.
I can't even zoom in.
And out of it is TrackMan plus at.
Anyway, these allow you to select it's basically a dictionary of preferences and things like that that
apply to your app.
So we have like a bundle name, we have a bundle version.
This is all the stuff that the App Store needs to pick up in order to update your app.
When you update your app to show the end user what version this is and various other bits and pieces
like that.
So basically, it's a bunch of properties.
We also have some things down here related to the display.
So Interface Orientation's is this a landscape or a portrait app?
How many of those portraits and landscapes can we use?
Can we turn the item upside down?
All defined pretty much here.
So those are the basic files.
Now, most of your work is going to be done in The View controller.
You will do some in the scene delegate, and very rarely you'll do some in the ALP delegate, most has
done an interview controller.
There is one view controller per screen, right?
We never, ever want to have sort of a view controller that controls two screens because you're going
to get a lot of crosswise and you don't want that.
So that's your little tour around a basic east project.
Let's move on.