Swift Programming Language: Cihad Horuzoglu
Swift Programming Language: Cihad Horuzoglu
Cihad Horuzoglu
Swift Overview
● Apple’s new programming language
● Write apps for iOS, Mac, watchOS,
tvOS, etc.
● Open source!
● Works with C and Objective-C
● Type Safety
● Modern Language
Playgrounds
How works Playground
IBM Bluemix Swift
Data Types
● Integers: 0, 1, 2, 42, 31337, -10
● String: “Kermit”, “Gonzo”, “Ms. Piggy”
● Double: 1.5, 3.14159, 81.2, 578.238
● Boolean: true, false
Variables
Constants
Comparison & Booleans
For Loops
Scope
“age” is available for entire scope
Features
● Method
● Computed Properties
Protocol
Stored Properties
Computed Properties
Property Access
Properties Sample
Stored Property
Computed Property
Extensions
Safe Unwrapping
Example
“ is ” keyword
Errors
Throwing Errors Handling Errors
Reference Counting
De-initializers
Resources
● https://github.com/swifteducation
● https://itunes.apple.com/us/book/swift-programming-
language/id881256329?mt=11
● https://thinkster.io/a-better-way-to-learn-swift
● https://github.com/hsavit1/Awesome-Swift-Education
● https://www.hackingwithswift.com/
Thank You!
@cihadhoruzoglu