You've already started watching Xcode 4: Editor and Utilities Area
Xcode 4 has a standard editor and assistant editor which allows you to view related files. It also has a utilities area which displays contextual information. Finally, there are a several shortcuts to help cut down development time.
-
0:00
[?music?]
-
0:02
[Think Vitamin Membership - Est. 2010] [membership.thinkvitamin.com]
-
0:07
iOS: Xcode4: Text Editor and Utilities Area with Amit Bijlani]
-
0:13
In this video, we will dive a little deeper into Xcode 4,
-
0:17
taking a look at the text editor and the utilities area.
-
0:22
Let's look at the editor.
-
0:24
Up here, you have a few icons, as you will see.
-
0:28
Right next to the standard editor--which if I click over here I will see the standard editor--
-
0:34
I have something called the Assistant, so if I click on that,
-
0:38
it actually gives me a side-by-side layout of a file that is related to the file that I'm editing.
-
0:47
So I'm looking at the ZoneClockAppDelegate
-
0:51
and right next to it over here is the implementation of ZoneClockAppDelegate.
-
0:59
As you might remember from Xcode 3, there was a whole jumping around
-
1:03
for different files, so here you don't have to jump around.
-
1:06
You have the interface and the implementation in one place, which is a huge help.
-
1:12
If you do not just want to look at the header file or the implementation file,
-
1:17
you can also change the kind of files the assistant displays to you
-
1:21
by clicking on counterparts.
-
1:24
So you can look at Counterparts over here, you can view the Subclasses, Superclasses,
-
1:31
Siblings, Protocols--all kinds of different things.
-
1:34
You can even specify it to be manual so you can manually set a file that you want to look at.
-
1:39
This is really, really a great and nifty feature.
-
1:43
Next to the assistant, I have something called in the Versions View.
-
1:48
The Versions View basically gives me the different versions that are stored;
-
1:54
the local version compared to the version that's stored on the server.
-
1:58
So as you notice, when we created the project,
-
2:02
we created a local git repository
-
2:05
so it will now maintain different versions as I commit to the git repository.
-
2:11
We will take a look at this in depth a little later,
-
2:15
but basically, to give you an overview, if you click on this little history icon,
-
2:20
it will actually show you the different versions based on all the commits that you've made.
-
2:27
So let's go back to the standard editor.
-
2:31
Then we have a few icons over here that are related to the view.
-
2:36
This one that displays the bottom is basically the debugger.
-
2:41
Here you will have your console output and while you're debugging, you will have
-
2:47
your debugging information over here.
-
2:50
And finally you have the right-most icon under the View group,
-
2:56
which is the utilities area.
-
2:59
The great thing about the utilities area is that you have a new option over here
-
3:04
that shows you quick help.
-
3:06
So if I click on any classes inside my code, you will see there's a quick help over here
-
3:11
which displays a brief description and references and links to the help file.
-
3:17
Below in the utilities area is your code snippets library.
-
3:21
You have other libraries, like the file template and the objects,
-
3:25
but we'll look at those when we take a look at the new interface builder.
-
3:30
So let's say you've forgotten how to write a for statement or an if statement,
-
3:34
or you're not just sure how certain things are written.
-
3:38
You can use the code snippets library where it actually populates
-
3:41
a template of the library for you.
-
3:44
So for example, I want to see what the For template looks like,
-
3:48
so I'm going to say For statement, and there you go.
-
3:52
It says--by the way, I was typing right down here; there's a little search box
-
3:58
and I wrote For statement and it brought this code snippet library up here.
-
4:06
I'm just going to drag this for statement into my code over here,
-
4:10
and as you can see, it populates it with a convenient template
-
4:14
that I can use as a starting point for my coding.
-
4:17
So it's very, very helpful, and in a later video, we will see
-
4:21
how we can use the code snippets library to put custom snippets over there.
-
4:27
And lastly, you might want to take a look at what's up top over here.
-
4:31
You have your little activity viewer where it shows you what's going on with your project,
-
4:37
when you last built, and if there are any issues.
-
4:41
You can take a look at the Run button, and if I just hold it down,
-
4:45
you will see that there are different options I have over here: Run, Test, Profile, Analyze.
-
4:51
And then there is the Stop button, which will stop your application from running in the simulator.
-
4:57
And finally, you have the Schemes.
-
5:01
The Schemes comes in very handy when you want to deploy the app
-
5:04
to different versions of iOS or different devices--you want to test them on different devices,
-
5:11
but we'll take an in-depth look at this in a future video
-
5:15
when we deploy code to a device.
-
5:17
Finally, I want to leave you with a few shortcuts,
-
5:20
convenient and helpful for you when you're going to be using Xcode 4.
-
5:25
So the first shortcut is Command + 0.
-
5:28
If I hit that, you will see that it shows and hides the navigation area.
-
5:35
The second shortcut is Command + Option + 0, which shows and hides
-
5:39
the utilities area to the right.
-
5:43
If you want to display the Assistant area, then you can hit Command + Option + Enter
-
5:48
and it will show you the assistant editor.
-
5:51
And if you just want to go back to the standard editor, you can just hit Command + Enter.
-
5:57
So there you have it--a few shortcuts to help you get started using Xcode 4.
-
6:02
So as you've seen, although Xcode 4 is not free,
-
6:06
it's worth paying the price for.
-
6:08
Not only will it be the standard going forward, but it will make your development a lot easier.
-
6:13
[?music?]
-
6:14
[Think Vitamin Membership - Est. 2010] [membership.thinkvitamin.com]
You need to sign up for Treehouse in order to download course files.
Sign up