Xcode is just installed, so let's launch Xcode 9. For the first time when you launch Xcode, it will install additional components, which can take a minute or 2. Once that's done, let's choose the option to create a project.
Xcode is now showing some suggested starting points, some templates for making different kinds of application, and there are a lot of options.
Xcode is far more than iOS development, and you can also see templates for macOS, Apple Watch, and for Apple TV, etc.
In this tutorial, we will use mostly a template from iOS Application section, So let's start by selecting the simplest and most straightforward option for iOS is the Single View App.
So let's choose Single View App and click Next. Xcode now asks for little more information to create this new project.You can change this information later, and it's just often easier to do it right at the start of a new project.
Git is fantastic, but here we will be covering only iOS, Xcode and Swift, so uncheck the checkbox and choose the path where you want to save your project. Let's select the desktop and click on the Create button, and you will see that the new project opens in Xcode.
We have two types of code files, the ones with .swift extension, some user interface files with .storyboard extension. Single-clicking a file will open it for editing in the central section, double-clicking will open that file in a separate floating window.
If you click on main.storyboard, this represents the user interface of our app with this blank area representing our first iOS screen, which is currently empty.In Xcode, we can design a user interface by dragging and dropping different controls. Now to see those controls, the right-hand panel of Xcode needs to be viewable. Now, this right panel has an upper section and a lower section. We need the lower section third button.
This is called the Object library, and when it is selected, you will see elements that we can drag and drop on to the user interface.
Let's search label and drag it onto the storyboard.
It is very small so let's resize it, and for this, we need to go back to that upper right-hand section of Xcode.
Double-Click on the label to change the value.
Let's run the application by clicking on the Play button in the Toolbar, and the simulator will launch.
Xcode installs our new app onto the simulated iPhone, launches the app, and should switch us over from Xcode to see it running.