Hey guys what's going on this is Caleb with Deb's Scott common in this video we're going to build our
X code project we're going to go into the interface builder and build the really simple app UI.
And we're also going to go ahead and wire it up with Iby outlets for each label.
So go ahead and pull up an X code and click Create new project then we're just going to choose a single
view application and we're going to go ahead and just name this maybe x y z.
Machine.
I don't know x y z machine that's good enough.
So click next and save it somewhere either on your desktop or in a folder somewhere.
And I'm going to make this full screen.
Now I don't necessarily want my screen moving around on me or rotating while moving the device so I'm
going to unstick landscape left and right.
And now all I have to do is go into here add three labels and we're pretty much good to go with exception
of connecting those labels to outlets.
So go ahead and type label drag it on and we're going to just copy and paste it twice.
And this is OK because we have not yet connected this to anything.
And then what we're going to do is we're going to go ahead and select all three of those labels and
put them into a stack.
OK.
So do that.
And now what we're going to do is we're going to go ahead and constrain this to the border of the screen.
So go ahead and put constraints here for the stacked view of 0 0 0 and 0 from all sides and add those
constraints.
Now of course that's not exactly how we want it to look.
And so we're going to go into distribution in the attributes and Specter and we're going to set it to
fill equally.
So now they're all spaced evenly like we would want and we're going to go ahead and also add the individual
labels here to have their text centered.
And we're going to make it much bigger so it's easier to see.
So select all three labels you can either do that over here in the document outline or you can just
select one hold shift and then click on the other two.
And now go ahead and center the font.
Click text click System Change the custom and I'm just going to choose a nicer looking font like Avenir
next and I'm going to set it to bold.
I think maybe heavy heavy is cool.
Yeah there we go.
OK.
And then I'm going to go ahead and actually make this size 100 which is really big but it will be cool.
So now I'm going to go ahead and edit the text here to say X and then a little space Y and a space and
then Z and a space.
Now this is cosmetic because we're going to actually set these values later in code.
But something we can do is we can change this to have a nice read for the X change the Y to have a yellow
Whyfor yellow funny anyway and then a blue is going to be for the z value.
So now we have three labels here X Y and Z and now all we need to do is connect them in our code file
so pull open the assistant editor by clicking these little rings here and we're going to right click
and drag.
OK so we're going to choose an item like this label right click and then drag over to the code file
and let go.
Now this is going to create an IP outlet which is a way that we can interface with this label from our
code file it's just kind of like a connector that lets us interface with it.
So go ahead and name this X label.
All righty.
Make some space and then right click and drag from this label and type y label get connected and do
the same thing for the Z label Z label Z label.
Nice connect that.
And now we are good to go.
Other than that we need to just get rid of did receive my memory warning.
I've never actually used that nor have I ever seen a developer use it so you know not to say that there's
no purpose.
But I don't know what one is.
Well I do.
Obviously if you're using a really memory intensive app that's called but I've never used it.
So anyway we are now totally connected.
We have our labels linked.
We could set their text if we wanted to here but we don't need to yet let's just let's build and run
to make sure this looks the way we want and so I'm going to go ahead and build and run.
It'll pop open on my phone and I'll pull up in quick time here so I can show you what's going on on
my phone screen.
Hopefully before it installs because it's going to take over my USP cable and that's my old version
of the app.
We're going to go ahead and run the new one right now.
There we go.
OK look at that boom.
It's centered.
The text is nice and big and easy to see.
This looks great guys so our interface is now totally finished being built.
We have successfully wired up all of our labels here in Interface Builder so that we can modify their
text property later on.
Let's move on to the next video where we're going to dive into core motion which is how we're going
to keep track of the accelerometer as well as a subclass called S.N. motion manager.
I'm going to show you some of the apple documentation and explain how what you'll learn in this course
can be applied to actually lots of other instruments that are built into your iPhone.
So very cool stuff.
Let's head over to the next video where we're going to dive into that Apple documentation and learn
about core emotion.
I'll see you there.