If you are new to iOS and Xcode isn't your everyday development environment, then you need to know how to use Xcode and go through the basics so that you are comfortable moving around in it. With the project open, the main part of Xcode is divided into three sections.
- This central editing section will always be shown, but you can hide/show the left and the right panels using the buttons at the very top.
- The left button hides/show left panel and right button hide/show right panel.
- There is a middle button in this group, and it toggles a bottom section on and off which is called a debug area.
It is mostly used when you are debugging your app, but the left and right sections, we will use all the time.
Now unlike some programming applications, you can't rearrange the Xcode interface. The left and right panels can be toggled on or off.You can also drag to resize them. There are different pieces within them, but nothing here is detachable, and nothing can be moved around or dragged and dropped from one side to the other.
There is a way to quickly understand the Xcode layout because there is an order to it, there's a sequence to it. It's a larger to smaller perspective going from left to right.
- The left side represents everything
- The middle is the one thing that you are currently working on
- The right is the one piece of that one thing.
The left panel is known and Navigator, it provides a way to navigate to your project, and there are nine navigators, and you can switch between them with these buttons at the top.
You will see several of these in the later section, but the most important is the first one which looks like a folder. It is the project navigator, and it provides the view of the different files in our project.
The middle area of Xcode is for editing regardless of whatever part of the project is currently selected. If you click a Swift file, this is a code editor.If you click on a storyboard, it switches to user interface editing.
If you select the first icon in the project navigator and click on the name of your project, it switches to edit the settings of the project itself.The right panel is known as utility panel, and it has two sections, an upper and lower. Both upper and lower sections are very different from each other.
The top section is called the Inspectors, and you can inspect, view, and often change the individual elements in your project.
The lower section contains four libraries.
- These libraries are collections of things that can be dragged and dropped into your project.
- For example, dragging and dropping a new code file into your project or dragging and dropping a new button into your user interface.
- In iOS, the library you'll use most often is the third button here, the Object library.
At the top, you can see the Xcode's toolbar and the Play and Stop buttons are mostly used. In the toolbar, you can select different devices and simulators to test our application on.In the center of the toolbar is an activity viewer, where you will see lots of status messages as you write code, build, and test your projects.