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

The Utilities panel (located to the right)

The Utilities panel gives us extra options to configure each active element. At the bottom part, we have sections with various templates which we can use in our development process.

At the top, there are two tabs. The first one is called File inspector. It's denoted with an icon like a new blank page. This tab shows information about the selected file. You can find information where the file is located on the hard drive and a few other options, as shown here:

We see the file location of the playground project. Also, it's using iOS as a platform and we can change that by picking another platform from the list. We can enable text markup in the playground or disable it. The markup will be discussed later in this chapter.

The second tab is called Quick Help Inspector. It provides extra contextual information based on the last, focused item in the editor. It's really handy when using a public interface (API) from Apple or any other third-party well-written (documented) library. We will learn more about external libraries and how to use them later in this book.

The number of tabs is more than two, when the project is a regular mobile app. Don't feel that we are skipping them; we will discuss them when they appear.

At the bottom of the Utilities panel, there is another section, which contains several tabs. This part contains different templates:

  • The first is the File Template Library, which can be used to add different files to a project
  • The next is the Code Snippet Library, which contains different code snippets
  • After that is the Object Library,  a collection of objects which can be added to a storyboard
  • Finally, there is the Media Library,  a list of all media items, which are part of your project or workspace

These panels are there to save you time when looking for something in your project. There is a neat filter function at the very bottom. Here is a screenshot that shows you how to get access to a list of all Swift code templates:

There is a small icon to the left of the filter text field. It switches between a list and grid view of the template tabs:

Next, we discuss the preferences of the IDE, so we can match our personal preferences.