Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
A Swift Introduction To Swift
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Neil Kimmett
August 22, 2016
Technology
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A Swift Introduction To Swift
Given at Codebar August 2016
https://codebar.io/meetings/monthly-aug-2016
Neil Kimmett
August 22, 2016
More Decks by Neil Kimmett
See All by Neil Kimmett
Scaling your app's release process
neilkimmett
0
300
React Native in a native world
neilkimmett
0
280
React Native on tvOS
neilkimmett
0
2.2k
Contributing to Swift
neilkimmett
0
86
Contributing to Swift
neilkimmett
0
71
A Swift introduction
neilkimmett
0
180
Writing Swift
neilkimmett
0
380
Practical WatchKit
neilkimmett
0
350
So you want to make an Apple Watch app?
neilkimmett
0
190
Other Decks in Technology
See All in Technology
大阪オフィスに Unitree Go2 がやってきたので Physical AI やってみた
dafujii
0
200
人にやさしく、AIにやさしく、書き手を選ばないIaCのガードレール再考 / Rethinking IaC Guardrails for Humans and AI Alike
kohbis
5
1.9k
SQL Server 2025 最適化されたロック
odashinsuke
0
110
AWS FinOps Agent 結局何が得意なの?
siromi
0
230
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
150
20260930_Gemma4_Hands-on
tsho
0
190
spanner-autoscalerに学ぶ CRD設計パターン 〜自動化と緊急時対応を両立する Kubernetesコントローラーの作り方〜
tkuchiki
0
220
AI臭い文章とは何なのか
nasuvitz
36
76k
Meet AgentCore Identity Consent Portal
hironobuiga
2
140
顧客の成果創出とプロダクトの成長を 両立するためのFDE
sansantech
PRO
0
560
Lambda MicroVMsは常駐サーバーの代わりに なるか? Kiro Crew を動かして検証してみた / Kiro Crew on Lambda MicroVMs
k_adachi_01
2
340
Claude Designがめちゃくちゃ便利なので使ってほしい
diggymo
0
170
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
780
Visualization
eitanlees
153
17k
Crafting Experiences
bethany
1
360
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Believing is Seeing
oripsolob
1
230
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
390
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
4 Signs Your Business is Dying
shpigford
187
23k
A Soul's Torment
seathinner
8
3.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
470
Transcript
A Swift Introduction To Swift by @neilkimmett
Swift is a type safe language
Types Javascript "1" + 2 = "12" Ruby x =
5 x = "a string" x = Dog.new
Types Swift "1" + 2
Types Swift var x = 5 x = "a string"
Types let number: Int = 2 let name: String =
"Sup Codebar" let primes: [Int] = [2, 3, 5, 7, 11] let view: UIView = UIView() view.backgroundColor = UIColor.whiteColor()
✨ Type inference ✨ let number = 2 let name
= "Sup Codebar" let primes = [2, 3, 5, 7, 11] let view = UIView() view.backgroundColor = .whiteColor()
Constants & variables let words = "Hello, there" words =
"Bye for now"
Constants & variables let words = "Hello, there" words =
"Bye for now"
Constants & variables let words = "Hello, there" words =
"Bye for now"
Constants & variables var words = "Hello, there" words =
"Bye for now"
Functions func multiply(array: [Int], by: Int) -> [Int]
Functions func multiply(array: [Int], by: Int) -> [Int] { var
result = [Int]() for x in array { result.append(x * by) } return result }
Functions func multiply(array: [Int], by: Int) -> [Int] { return
array.map({ (x) -> Int in return x * by }) }
Functions func multiply(array: [Int], by: Int) -> [Int] { return
array.map { $0 * by } }
Functions func multiply(array: [Int], by: Int) -> [Int] { return
array.map { $0 * by } } multiply(array: numbers, by: 2)
Classes class Counter { private var count = 0 func
increment() { count += 1 } } let counter = Counter() counter.increment()
Optionals?!
Optionals class Codebar { var location: String = "Pivotal Labs,
EC1V 9NR" } let codebar = Codebar() // insert lots of awesome talks here codebar.location = "The pub" // insert lots of inspiring conversations here codebar.location = nil !
?
Optionals class Codebar { var location: String? = "Pivotal Labs,
EC1V 9NR" } let codebar = Codebar() // stuff codebar.location = nil !
Other super awesome stuff • structs • enums • protocols
• generics • frameworks
Further reading • "The Swift Programming Language" by Apple •
raywenderlich.com • swift.org • WWDC videos • IBM Swift Sandbox • Swift Playgrounds for iPad on iOS 10
Thanks ! @neilkimmett "
[email protected]
# kimmett.me