Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Swift Intro
Search
Max Goedjen
December 02, 2014
Programming
70
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swift Intro
Max Goedjen
December 02, 2014
Other Decks in Programming
See All in Programming
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
初めてのKubernetes 本番運用でハマった話
oku053
0
130
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
2.8k
霧の中の代数的エフェクト
funnyycat
1
410
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
580
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
200
AIエージェントで 変わるAndroid開発環境
takahirom
2
680
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
120
yield再入門 #phpcon
o0h
PRO
0
630
act1-costs.pdf
sumedhbala
0
240
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.3k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
730
Facilitating Awesome Meetings
lara
57
7k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Building Adaptive Systems
keathley
44
3.1k
Making Projects Easy
brettharned
120
6.7k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Optimizing for Happiness
mojombo
378
71k
Ruling the World: When Life Gets Gamed
codingconduct
0
280
Transcript
SWIFT
iOS & Mac
Why?
Modern Safe Interoperable
Modern
Modern [ ]
Objective-C [someObject doSomething]; Swift someObject.doSomething()
Modern Blocks & Closures
Objective-C - (void)doSomethingWithCompletion:(void (^)(NSError *))completion; Swift func doSomethingWithCompletion(completion: (NSError) ->
(Void))
Modern Primitives & Literals
Objective-C NSArray *numbers = @[@1, @2, @3]; // NSArray *numbers
= [NSArray arrayWithObjects: // [NSNumber numberWithInt:1], // [NSNumber numberWithInt:2], // [NSNumber numberWithInt:3] // ]; Swift let numbers = [1, 2, 3]
Modern Custom Operators
Custom Operators { /* do some task */ } ~>
{ /* update some UI */}
Safety
Safety Static Typing
Safety Nil Safety
Objective-C SomeObject *someObject = nil; [someObject performCriticalTask]; Swift let someObject:
SomeObject = nil someObject.performCriticalTask() // Compiler error
Objective-C SomeObject *object = nil; NSArray *objectList = @[object]; //
Crash Swift let object: SomeObject? let objectList = [object] // :)
Safety Immutability
Objective-C NSArray & NSMutableArray Swift let & var
Common iOS Tasks Delegation
Objective C if ([self.delegate respondsToSelector:@selector(someDelegateMessage:)]) { [self.delegate someDelegateMessage:self]; } Swift
delegate?.someDelegateMessage?(self)
Interoperability
Swift All The Things? Not So Fast
None
Xcode !
None
Tooling
Tooling REPL
Tooling Playgrounds
Playgrounds
Further Reference Learn Design AND Code!!! GitHub Swift Book Swift
Blog objc.io Airspeed Velocity