The symbol navigator is a tab of the navigator that allows you to quickly jump to specific method and property definitions. This movie shows how to use the symbol navigator to get to the code you want to use, while spending as little time as possible to g
- View Offline
- [Instructor] The symbol navigator gives you quick access to properties and methods both built into your code and ones that you've defined on your own. We can go to the symbol navigator in the navigator bar. It's immediately to the right of the project navigator. In here, we see, are two classes AppDelegate and ViewController. If I open up AppDelegate, I see the methods that are declared in there. I can single-click on either of these, and I'm instantly taken to the appropriate method in the appropriate file.
In ViewController I see both the built-in methods that are already in the file and my own custom example method. I can click on the example method, and I'm taken right there. The same applies to custom created properties, so if I create a property right here and call it myProp, give it some value, save the file. It then shows up as a property, so we have this P letter right here for properties and M for methods, so we have this organization here in the symbol navigator.
We also have these options down here. If you hover over them it says show only class and protocol symbols, hide other global symbol types. You can use these buttons down here to control filtering. We can show globals. We don't have any globals in our project, but if I declared one right here above my class, I would then see it in my globals as soon as I saved the file. Command + S to save the file and there is my global called e.
We can also use the filter bar to search, so I can type example, and then I see my example method, so if you know what a method's called, you can type it right here in the symbol navigator and instantly find it. You can use this button as well to show only containers. You can hide members, so we only see our classes and protocols. We don't see the inner members which are methods and properties, so we can choose to show that. This button in the middle shows only project defined symbols, so when I uncheck that then we start to show system symbols, so parts of the API.
Most of the time you're not going to want that, and as you're seeing on my screen right now, it takes a minute to load everything up, so you may not want that. Usually you'll have this checked, and if you want to show your globals, you can have the C unchecked or you can choose it if you just want to show your own classes, so using the symbol navigator you can quickly and easily jump between methods and properties and globals that you've defined all throughout your code.
These Xcode tutorials help new developers install Xcode and start writing and editing code. Instructor Todd Perkins shows how to build a brand-new user interface (UI) with buttons and menus in Interface Builder, Xcode's intuitive UI design tool, as well as advanced designs that adapt to screen size, aspect ratio, and orientation changes. He reviews the version control and storyboard features, as well as the basics of schemes and behaviors. Plus, learn how to compile and debug apps, test apps in the iOS Simulator, and send your app to Apple for distribution in the App Store.
- What is Xcode?
- Installing Xcode 8
- Creating your first Xcode project
- Editing code
- Creating snippets
- Adding Git version control
- Making interface connections to the code
- Using Interface Builder
- Creating storyboards
- Pinning objects
- Compiling code with the LLVM compiler
- Working with schemes and behaviors
- Sharing resources in a workspace
- Catching common errors with Analyze and Fix-It
- Using the iOS Simulator
- Preparing an app to be published