position: fixed; top: auto !important; margin-left: 112px;

Get Started

Once you downloaded the Xcode, you are now set to create your first iOS App in Swift.

If you had not yet seen our step by step Swift tutorials series, we strongly recommend to get the basics of Swift first.

Open Xcode

  1. Goto File

  2. New

  3. Project

  4. Single View Application

  5. Enter your Project Name. Ours will be ToDoListApp

  6. Next

You might notice that ViewController.swift file has been created.

We will learn more about UiView Lifecycle but for now just know that you have to write the code in viewDidLoad method .

import UIKit

class ViewController: UIViewController {
    override func viewDidLoad()
        print("Hello World")


Hello World


Storyboard is the place where we design our app UI. Learning Storyboard is not as hard. It's just dragging and drop feature for designing User Interface(UI). So, let's first create one Label with some text and one Button which when clicked display an alert showing some message.

As shown in the figure, there is an empty scene where we add UI elements from Object Library and whenever we add any UI element it will also be included in Document Outline. The arrow on the left of the scene is the Initial View Controller by default.

If not yet seen our step by step Swift tutorials series, we strongly recommend to get the basics of Swift first.

Drag a Label and Button from Object Library in the empty scene.

Now, to change the text of Label select Attributes Inspector from top right menu as shown in figure.

Similarly, for button select button from the scene and move to Attributes Inspector.

Before we start creating a To-do List App, we will cover some of the basics you must know about the basics of how to create User Interface in Swift. So let's begin with it in next article.

Solve the Quiz of Article

1) What do you think viewDidLoad is the method where you gonna write your Swift App inital code?

2) Can we create the design of our To-Do List App using Storybord or XIB?

Previous Next Article


Largest collection of up-to-date tutorials to learn programming languages. We are focused on easy learning. Massive collection of interview questions one may need for preparation.

Social Profile


Copyright 2019. All rights reserved.