For product name, use IntellijSwiftAccelerator and then fill out the Organization Name and Organization Identifier with your customary values. Enter Swift as Language and make sure only iPhone is selected in Devices. Click Next.

P.S: Don’t forget to untick Include Unit Tests and Include UI Tests.

Open Main.storyboard. Set to Compact Width | Any Height.

Compact Width | Any Height

Ctrl + Drag from the Label to the File’s Owner and make the connection with the corresponding properties.

Accelerator ViewController

Create a new ViewController.

Cocoa Touch Class

UIViewController

Then make sure you attach this file into view controller in Identity inspector.

Identity inspector -UIViewController

The other properties are needed to update the Labels with the axes values. Go to ViewController.swift and add 3 UILabels to the main View.

For product name, use IntellijSwiftCamera and then fill out the Organization Name and Organization Identifier with your customary values. Enter Swift as Language and make sure only iPhone is selected in Devices. Click Next.

P.S: Don’t forget to untick Include Unit Tests and Include UI Tests.

Open Main.storyboard. Set to Compact Width | Any Height.

Compact Width | Any Height

This is a very simple user interface consisting of an image view, a toolbar and two bar button items. (Don’t forget to set AutoLayout).

Camera ViewController

Create a new ViewController.

Cocoa Touch Class

UIViewController

Then make sure you attach this file into view controller in Identity inspector.

Identity inspector -UIViewController

Select the image view object in the view canvas, display the Assistant Editor panel. Ctrl-click on the image view object and drag to a position just below the class declaration line in the Assistant Editor. Release the line, and, in the resulting connection dialog, establish an outlet connection named imageView.

With the Assistant Editor still visible, establish action connections for the two buttons to methods named useCamera and useCameraRoll respectively (keeping mind that it may be necessary to click twice on each button to select it since the first click will typically select the toolbar parent object).

Action – userCamera

Action – useCameraRoll

Open CameraViewController.swift and update the with this code for useCamera and useCameraRoll functions.

Swift is an innovative new programming language for Cocoa and Cocoa Touch. Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.

Before we start this tutorial, make sure you already setup your machine (mac) with these tools:

Xcode 7.3.1 – https://developer.apple.com/xcode/downloads/

Open Xcode and select Create a new Xcode project.

Welcome to Xcode

Select Single View Application and click Next.

Single View Application

For product name, use IntellijSwiftToDoList and then fill out the Organization Name and Organization Identifier with your customary values. Enter Swift as Language and make sure only iPhone is selected in Devices. Click Next.

P.S: Don’t forget to untick Include Unit Tests and Include UI Tests.

IntellijSwiftToDoList

Install CocoaPods using terminal. What is CocoaPods?

CocoaPods manages library dependencies for your Xcode projects.

The dependencies for your projects are specified in a single text file called a Podfile. CocoaPods will resolve dependencies between libraries, fetch the resulting source code, then link it together in an Xcode workspace to build your project.

Ultimately the goal is to improve discoverability of, and engagement in, third party open-source libraries by creating a more centralised ecosystem.

Select the Table View Controller again and in the menu go to Editor > Embed In >Navigation Controller. This adds a Navigation Controller to the storyboard with an initial scene.

Editor > Embed In > Navigation Controller

Select the Navigation Item under the Table View Controller, and in the Attributes Inspector type To Do List as the Title.

Navigation Item

From the Object Library, drag a Bar Button Item to the right of the navigation bar on the Table View Controller. Select the Bar Button Item (which has a default value of “Item”) and in the Attributes Inspector, in the Identifier option, choose Add. This will change the button to the add symbol (+).

Bar Button Item

Select the Table View Controller, press control button and drag to View Controller like image below. We added a segue. Name it MySegue in Show the Attributes Inspector > Identifier.