SlideShare a Scribd company logo
iOS for Android
Developers
with Swift
David Truxall, Ph.D.
http://bit.ly/androidToIos
About Me
@davetrux
blog.davidtruxall.com
You
● Know Java
● Know Android
● Don’t know Swift
● Don’t know iOS
● Need a Mac
Goal
Learn basic iOS concepts for someone
familiar with Android
(using Swift)
Why?
● Do I hate Android now?
● Neither platform is “the winner”
● Clients want both platforms
● You can make more money
● Swift is the new hotness in mobile
● Objective-C
Agenda
1. Brief language intro
2. Project/Tool Structure
3. App Architecture
4. Coding Demo
Swift
● Object-oriented AND Functional
● C family
● Cleaner, simpler, safer than Objective-C
● Modern features
Compare
- (NSString*) concatenateString:(NSString*)stringA withString:(NSString*)stringB
{
NSString *finalString = [NSString stringWithFormat:@"%@%@", stringA, stringB];
return finalString;
}
func concatenateString(stringA: String, stringB: String) ->String {
let result = stringA + stringB
return result
}
Swift Features
● Closures
● Tuples and multiple return values
● Generics
● Structs that support methods
● Functional programming patterns
Java/Android Swift/iOS
import com.package.name; import frameworkname
int counter; var counter :Int
static final int LEVELS = 8; let levels = 8
private private
public public
- internal (*)
protected -
Language
Java/Android Swift/iOS
class Foo extends Bar {} class Foo : Bar
interface Baz{} protocol Baz
class Foo implements Baz{} class Bar : Baz {}
Foo(); init()
void doWork(String arg){} func doWork(arg: String) -> Void
Foo item = new Foo(); var item : Foo = Foo()
item.doWork(arg); item.doWork(arg)
Objects
Optionals
? - Has a value or no value at all (nil)
! - Implicitly Unwrapped Optional
Swift OO
class VideoMode {
var resolution : Resolution = Resolution()
var interlaced = false
let frameRate = 60.0
var name: String?
func setUpMode(modeName: String) -> Void {<do stuff>}
}
Swift Functional
func addTwoInts(a: Int, b: Int) -> Int {
return a + b
}
var addFunction: (Int, Int) -> Int = addTwoInts
func printMath(mathFunction: (Int, Int) -> Int, a: Int,
b: Int) {
println("Result: (mathFunction(a, b))")
}
printMath(addTwoInts, 3, 5)
Xcode
● Free
● It’s an IDE
● Click not double-click
● Virtual file organization
Demo
Application Architecture
Model - View - Controller
UI Organization and Plumbing
Model - View -Controller
Controller
ModelView
Update
User Action
Update
Notify
Android != Model-View-Controller
Activity
Provider
Layout
Update
Notify
iOS Model - View -Controller
ViewController
Custom ClassesUIView
Update via IBOutlet
Respond to IBAction
Update
Notify
UI Organization
Android iOS
Layout XML XIB (NIB)
- Storyboard
- IBOutlet
- IBAction
Intent ~ Segue
Lifecycle Events
Android iOS
onCreate (onCreateView) viewDidLoad
onStart viewWillAppear
onResume viewDidAppear
onPause viewWillDisappear
onStop viewDidDisappear
UI Elements
Android iOS
TextView UILabel
EditText (single line) UITextField
EditText (multi-line) UITextView
Button UIButton
RadioGroup SegmentedControl
CheckBox, ToggleButton UISwitch
Delegation
● Class has a property that is a protocol
● Second class implements the protocol
● Second class assigned to the variable in
the first class
Converting an App
Yet Another Shameless Plug
@davetrux
blog.davidtruxall.com
http://bit.ly/androidToIos
Resources
Apple's Swift iBook
Swift Developer Center
Migrating to Swift from Android Book
Empty Application template
http://bit.ly/androidToIos
Ad

Recommended

Categories for the Working C++ Programmer
Categories for the Working C++ Programmer
Platonov Sergey
 
Debugging and Profiling C++ Template Metaprograms
Debugging and Profiling C++ Template Metaprograms
Platonov Sergey
 
Objectivec vs swift
Objectivec vs swift
Nisr Mohamed
 
Swift vs Objective-C
Swift vs Objective-C
Mindfire Solutions
 
Lightning talk: Kotlin
Lightning talk: Kotlin
Evolve
 
Migration Objective-C to Swift
Migration Objective-C to Swift
Nattapon Nimakul
 
Computer Engineering (Programming Language: Swift)
Computer Engineering (Programming Language: Swift)
Sethmi Kachchakaduge
 
A Journey From Objective C to Swift - Chromeinfotech
A Journey From Objective C to Swift - Chromeinfotech
ChromeInfo Technologies
 
Html
Html
Shohan Ahmed
 
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
JSFestUA
 
Angular 2.0: Brighter future?
Angular 2.0: Brighter future?
Eugene Zharkov
 
Constructors and Destructor in C++
Constructors and Destructor in C++
International Institute of Information Technology (I²IT)
 
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
Publicis Sapient Engineering
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
Piotr Benetkiewicz
 
Get together on getting more out of typescript &amp; angular 2
Get together on getting more out of typescript &amp; angular 2
Ruben Haeck
 
Polymorphism (2)
Polymorphism (2)
Army Public School and College -Faisal
 
Constructor and destructor in c++
Constructor and destructor in c++
Learn By Watch
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Brendan Eich
 
JS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better Parts
JSFestUA
 
JSHint: Learning JavaScript the Hard Way
JSHint: Learning JavaScript the Hard Way
Adrian-Tudor Panescu
 
JS Responsibilities
JS Responsibilities
Brendan Eich
 
#OOP_D_ITS - 4th - C++ Oop And Class Structure
#OOP_D_ITS - 4th - C++ Oop And Class Structure
Hadziq Fabroyir
 
Essential Test-Driven Development
Essential Test-Driven Development
TechWell
 
Cross Platform App Development with C++
Cross Platform App Development with C++
Joan Puig Sanz
 
Thinking functional-in-scala
Thinking functional-in-scala
Knoldus Inc.
 
Swift Tutorial Part 1. The Complete Guide For Swift Programming Language
Swift Tutorial Part 1. The Complete Guide For Swift Programming Language
Hossam Ghareeb
 
astTECS Call Center Solutions
astTECS Call Center Solutions
Jyothis John
 
Swift Programming Language
Swift Programming Language
Giuseppe Arici
 
A swift introduction to Swift
A swift introduction to Swift
Giordano Scalzo
 
iOS UIKit
iOS UIKit
WOX APP
 

More Related Content

What's hot (17)

Html
Html
Shohan Ahmed
 
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
JSFestUA
 
Angular 2.0: Brighter future?
Angular 2.0: Brighter future?
Eugene Zharkov
 
Constructors and Destructor in C++
Constructors and Destructor in C++
International Institute of Information Technology (I²IT)
 
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
Publicis Sapient Engineering
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
Piotr Benetkiewicz
 
Get together on getting more out of typescript &amp; angular 2
Get together on getting more out of typescript &amp; angular 2
Ruben Haeck
 
Polymorphism (2)
Polymorphism (2)
Army Public School and College -Faisal
 
Constructor and destructor in c++
Constructor and destructor in c++
Learn By Watch
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Brendan Eich
 
JS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better Parts
JSFestUA
 
JSHint: Learning JavaScript the Hard Way
JSHint: Learning JavaScript the Hard Way
Adrian-Tudor Panescu
 
JS Responsibilities
JS Responsibilities
Brendan Eich
 
#OOP_D_ITS - 4th - C++ Oop And Class Structure
#OOP_D_ITS - 4th - C++ Oop And Class Structure
Hadziq Fabroyir
 
Essential Test-Driven Development
Essential Test-Driven Development
TechWell
 
Cross Platform App Development with C++
Cross Platform App Development with C++
Joan Puig Sanz
 
Thinking functional-in-scala
Thinking functional-in-scala
Knoldus Inc.
 
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
JSFestUA
 
Angular 2.0: Brighter future?
Angular 2.0: Brighter future?
Eugene Zharkov
 
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
Publicis Sapient Engineering
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
Piotr Benetkiewicz
 
Get together on getting more out of typescript &amp; angular 2
Get together on getting more out of typescript &amp; angular 2
Ruben Haeck
 
Constructor and destructor in c++
Constructor and destructor in c++
Learn By Watch
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Brendan Eich
 
JS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better Parts
JSFestUA
 
JSHint: Learning JavaScript the Hard Way
JSHint: Learning JavaScript the Hard Way
Adrian-Tudor Panescu
 
JS Responsibilities
JS Responsibilities
Brendan Eich
 
#OOP_D_ITS - 4th - C++ Oop And Class Structure
#OOP_D_ITS - 4th - C++ Oop And Class Structure
Hadziq Fabroyir
 
Essential Test-Driven Development
Essential Test-Driven Development
TechWell
 
Cross Platform App Development with C++
Cross Platform App Development with C++
Joan Puig Sanz
 
Thinking functional-in-scala
Thinking functional-in-scala
Knoldus Inc.
 

Viewers also liked (20)

Swift Tutorial Part 1. The Complete Guide For Swift Programming Language
Swift Tutorial Part 1. The Complete Guide For Swift Programming Language
Hossam Ghareeb
 
astTECS Call Center Solutions
astTECS Call Center Solutions
Jyothis John
 
Swift Programming Language
Swift Programming Language
Giuseppe Arici
 
A swift introduction to Swift
A swift introduction to Swift
Giordano Scalzo
 
iOS UIKit
iOS UIKit
WOX APP
 
Visual Studio 2005 Database Professional Edition
Visual Studio 2005 Database Professional Edition
David Truxall
 
Day Of Dot Net Ann Arbor 2008
Day Of Dot Net Ann Arbor 2008
David Truxall
 
To Swift 2...and Beyond!
To Swift 2...and Beyond!
Scott Gardner
 
InterConnect: Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java Developers
Chris Bailey
 
iOS Swift & OCR 玩文字辨識
iOS Swift & OCR 玩文字辨識
政斌 楊
 
InterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and When
Chris Bailey
 
Consuming Web Services in Android
Consuming Web Services in Android
David Truxall
 
Bust the Android Fragmentation Myth
Bust the Android Fragmentation Myth
Chiu-Ki Chan
 
Advanced Visual Studio 2005 Tools For Office Programming And Deployment
Advanced Visual Studio 2005 Tools For Office Programming And Deployment
David Truxall
 
Swift on the Server
Swift on the Server
Dev_Events
 
Swift
Swift
Larry Ball
 
class vs struct
class vs struct
Daniel Souza
 
8 swift 중첩함수
8 swift 중첩함수
Changwon National University
 
Class vs struct for Swift
Class vs struct for Swift
Hirakawa Akira
 
Struct vs Class in Swift
Struct vs Class in Swift
Ungur Laurentiu Nicolae
 
Swift Tutorial Part 1. The Complete Guide For Swift Programming Language
Swift Tutorial Part 1. The Complete Guide For Swift Programming Language
Hossam Ghareeb
 
astTECS Call Center Solutions
astTECS Call Center Solutions
Jyothis John
 
Swift Programming Language
Swift Programming Language
Giuseppe Arici
 
A swift introduction to Swift
A swift introduction to Swift
Giordano Scalzo
 
iOS UIKit
iOS UIKit
WOX APP
 
Visual Studio 2005 Database Professional Edition
Visual Studio 2005 Database Professional Edition
David Truxall
 
Day Of Dot Net Ann Arbor 2008
Day Of Dot Net Ann Arbor 2008
David Truxall
 
To Swift 2...and Beyond!
To Swift 2...and Beyond!
Scott Gardner
 
InterConnect: Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java Developers
Chris Bailey
 
iOS Swift & OCR 玩文字辨識
iOS Swift & OCR 玩文字辨識
政斌 楊
 
InterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and When
Chris Bailey
 
Consuming Web Services in Android
Consuming Web Services in Android
David Truxall
 
Bust the Android Fragmentation Myth
Bust the Android Fragmentation Myth
Chiu-Ki Chan
 
Advanced Visual Studio 2005 Tools For Office Programming And Deployment
Advanced Visual Studio 2005 Tools For Office Programming And Deployment
David Truxall
 
Swift on the Server
Swift on the Server
Dev_Events
 
Class vs struct for Swift
Class vs struct for Swift
Hirakawa Akira
 
Ad

Similar to iOS for Android Developers (with Swift) (20)

Objective-C to Swift - Swift Cloud Workshop 3
Objective-C to Swift - Swift Cloud Workshop 3
Randy Scovil
 
Swift, swiftly
Swift, swiftly
Jack Nutting
 
Intro toswift1
Intro toswift1
Jordan Morgan
 
SV-ios-objc-to-swift
SV-ios-objc-to-swift
Randy Scovil
 
Swift rocks! #1
Swift rocks! #1
Hackraft
 
Quick swift tour
Quick swift tour
Kazunobu Tasaka
 
Developing Swift - Moving towards the future
Developing Swift - Moving towards the future
Pablo Villar
 
Think sharp, write swift
Think sharp, write swift
Pascal Batty
 
Swift - the future of iOS app development
Swift - the future of iOS app development
openak
 
Swift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming language
Hossam Ghareeb
 
iOSNeXT.ro - 10 reasons you'll love Swift - Paul Ardeleanu
iOSNeXT.ro - 10 reasons you'll love Swift - Paul Ardeleanu
Paul Ardeleanu
 
Ios 12 Programming Fundamentals With Swift Swift Xcode And Cocoa Basics 5th E...
Ios 12 Programming Fundamentals With Swift Swift Xcode And Cocoa Basics 5th E...
joettealhadi
 
Start with swift
Start with swift
Arti Yadav I am looking for new Projects
 
Introduction to Swift programming language.
Introduction to Swift programming language.
Icalia Labs
 
Swift - One step forward from Obj-C
Swift - One step forward from Obj-C
Nissan Tsafrir
 
Custom view
Custom view
SV.CO
 
From android/java to swift (1)
From android/java to swift (1)
allanh0526
 
Swift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-C
Alexis Gallagher
 
Introduction to Swift
Introduction to Swift
Matteo Battaglio
 
Developing iOS apps with Swift
Developing iOS apps with Swift
New Generation Applications
 
Objective-C to Swift - Swift Cloud Workshop 3
Objective-C to Swift - Swift Cloud Workshop 3
Randy Scovil
 
SV-ios-objc-to-swift
SV-ios-objc-to-swift
Randy Scovil
 
Swift rocks! #1
Swift rocks! #1
Hackraft
 
Developing Swift - Moving towards the future
Developing Swift - Moving towards the future
Pablo Villar
 
Think sharp, write swift
Think sharp, write swift
Pascal Batty
 
Swift - the future of iOS app development
Swift - the future of iOS app development
openak
 
Swift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming language
Hossam Ghareeb
 
iOSNeXT.ro - 10 reasons you'll love Swift - Paul Ardeleanu
iOSNeXT.ro - 10 reasons you'll love Swift - Paul Ardeleanu
Paul Ardeleanu
 
Ios 12 Programming Fundamentals With Swift Swift Xcode And Cocoa Basics 5th E...
Ios 12 Programming Fundamentals With Swift Swift Xcode And Cocoa Basics 5th E...
joettealhadi
 
Introduction to Swift programming language.
Introduction to Swift programming language.
Icalia Labs
 
Swift - One step forward from Obj-C
Swift - One step forward from Obj-C
Nissan Tsafrir
 
Custom view
Custom view
SV.CO
 
From android/java to swift (1)
From android/java to swift (1)
allanh0526
 
Swift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-C
Alexis Gallagher
 
Ad

Recently uploaded (20)

wAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptx
SimonedeGijt
 
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Intelli grow
 
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Safe Software
 
How the US Navy Approaches DevSecOps with Raise 2.0
How the US Navy Approaches DevSecOps with Raise 2.0
Anchore
 
Advanced Token Development - Decentralized Innovation
Advanced Token Development - Decentralized Innovation
arohisinghas720
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Tech Services
 
Smadav Pro 2025 Rev 15.4 Crack Full Version With Registration Key
Smadav Pro 2025 Rev 15.4 Crack Full Version With Registration Key
joybepari360
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
OpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native Barcelona
Imma Valls Bernaus
 
Integrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FME
Safe Software
 
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWS
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWS
BradBedford3
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
Rierino Commerce Platform - CMS Solution
Rierino Commerce Platform - CMS Solution
Rierino
 
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
BradBedford3
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
wAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptx
SimonedeGijt
 
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Intelli grow
 
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Safe Software
 
How the US Navy Approaches DevSecOps with Raise 2.0
How the US Navy Approaches DevSecOps with Raise 2.0
Anchore
 
Advanced Token Development - Decentralized Innovation
Advanced Token Development - Decentralized Innovation
arohisinghas720
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Tech Services
 
Smadav Pro 2025 Rev 15.4 Crack Full Version With Registration Key
Smadav Pro 2025 Rev 15.4 Crack Full Version With Registration Key
joybepari360
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
OpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native Barcelona
Imma Valls Bernaus
 
Integrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FME
Safe Software
 
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWS
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWS
BradBedford3
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
Rierino Commerce Platform - CMS Solution
Rierino Commerce Platform - CMS Solution
Rierino
 
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
BradBedford3
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 

iOS for Android Developers (with Swift)