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
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
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
5
1.2k
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
460
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
200
価値について
gree_tech
PRO
0
140
導入から定着へ ~コーディングエージェントを日常業務に組み込む実践知~
yukisakai1225
0
150
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
380
DevelopersIO2026 -バックアップは“消されないこと”が9割-
yoshida0129
0
230
OptunaHub: ブラックボックス最適化のためのプラットフォーム
pfn
PRO
0
150
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
220
freeeにおけるSoftware Factory
freee
PRO
0
260
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
470
Browser Spec: Testing Hotwire with Ruby
takahashim
1
150
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.2k
Building the Perfect Custom Keyboard
takai
2
910
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
550
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
530
Unsuck your backbone
ammeep
672
58k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
A Modern Web Designer's Workflow
chriscoyier
699
190k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
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