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