workshop ios

Post on 20-Feb-2017

64 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

iOS Developmentwith Swift

print("SWIFT")

What?

Multi-paradigm

Designed by Apple

First Appeared in June, 2014

Why?

Productivity

Inter-operability

Apple’s Language of choice

Who?

Playground

Syntax

Constants and Variables

let place: String = "Pace"

let year: Int = 2015

let isHavingFun: Bool = true

var version: Double = 1.0

version = 2.1

Type Inference

let place = "Pace"

let year = 2015

let isHavingFun = true

var version = 1.0

version = 2.1

Most awesome feature

Strings

Concatenation

Type Cast

Format

Arrays and Dictionaries

var emptyArray = [String]()

emptyArray.append("foo")

let someNumbers = [1, 2, 3]

var majors = Dictionary<String, String>()majors["John"] = "Computer Science"majors.removeValueForKey("John")

let schedule = [ "morning": "classes", "afternoon": "awesome workshop", "night": "party",]

Optionals

let numberOfLegs = ["ant": 6, "snake": 0, "cheetah": 4]

let possibleLegCount: Int? = numberOfLegs["aardvark"]

Flow Control

If / Else

For / While

Switch

Functions

func hello(name: String = “world”){ print (“Hello \(name)”)}

func add(n1: Int, n2: Int) -> Int { return n1 + n2}

add(1, n2: 2)

Classes

Class DeclarationInheritanceInitializationMethod overriding

Creating an iOS Project

App Lifecycle

ViewController Lifecycle

UIKit and Interface Builder

UIViewControllerUIViewUILabelUIButtonUIImageViewUITableViewUITextField

Importing Assets

Let’s Do Something!

Thanks!

Ian CarvalhoTwitter: @ian.carv

top related