Learn Swift by Building Applications
上QQ阅读APP看书,第一时间看更新

The Navigator panel (located to the left)

The Navigator panel displays the project structure on the left. It has root item(s). Usually, this is the project and the project looks like a tree. We can use the arrows to expand each level of this visual tree. Using right-click, we bring up a menu, where some handy shortcuts are displayed as shown in the following screenshot:

The Navigator panel contains a bottom menu which has the following options:

  • + button: To add new files to the project.
  • Filter text field: A textbox which can be used to filter the content of the preceding list. For example, if we want to see all images which are the .png files, then we can simply enter  PNG in the filter. In our case, with the currently opened playground, this will display the text No Filter Results.
  • Show only recent files: The clock icon, if it’s activated, will show the recent files only.
  • Show only files with source control status: The square icon, if active will display the files under Source Control (included in the Git repository).

The Navigator panel has four tabs when we are exploring the playground project. It has a few more when the project is a mobile one.

The first tab is the project navigator, as we already know. The next is the symbol navigator, the place where we can explore the source code structure. (Don't panic—we will learn how to create all these structures and will be able to use this panel.) The third is the find navigator, the place that is used when we want to locate something in a project, not only in the source files. This tab contains different options to tweak the search. Don't be afraid; explore them to narrow down what you are looking for.

The last tab is the issue navigator. In this tab, we have a list of all build-time and runtime issues caused by our project. 

At the bottom, there is a filter on each tab, which is similar to the one we had discussed earlier. You can use it to filter the results presented in the tab.