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
Thinking in Swift!
Search
Ritesh Gupta
January 21, 2017
Technology
3
360
Thinking in Swift!
Swift India, Delhi Meetup
Ritesh Gupta
January 21, 2017
Tweet
Share
More Decks by Ritesh Gupta
See All by Ritesh Gupta
Declarative Networking with Combine –– iOS Conf SG 2020
riteshhh
0
160
Combine! All the things
riteshhh
3
670
Deep dive into Protocols
riteshhh
1
360
How to be a POP-Star
riteshhh
1
300
Other Decks in Technology
See All in Technology
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
100
Can We Measure Developer Productivity?
ewolff
1
150
Lexical Analysis
shigashiyama
1
150
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
Taming you application's environments
salaboy
0
190
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
660
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
880
Platform Engineering for Software Developers and Architects
syntasso
1
520
Terraform Stacks入門 #HashiTalks
msato
0
360
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Rails Girls Zürich Keynote
gr2m
94
13k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Optimizing for Happiness
mojombo
376
70k
Teambox: Starting and Learning
jrom
133
8.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
4 Signs Your Business is Dying
shpigford
180
21k
Automating Front-end Workflow
addyosmani
1366
200k
We Have a Design System, Now What?
morganepeng
50
7.2k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Designing for humans not robots
tammielis
250
25k
Transcript
in Swift ~ Ritesh Gupta (Swift India, Delhi Meetup)
Swift is just not a syntax migration from Objective-C…
Swift is not objective-c styled language…
C ~> C++ Objective-C ~> Swift { imperative } {
object oriented } { object oriented } { protocol oriented }
None
None
None
None
stuck with Inheritance..
None
None
compose everything with Protocols..
UIButton UIBarButtonItem
UIButton UIControl UIView
UIBarButtonItem UIBarItem NSObject
UIBarButtonItem UIBarItem NSObject UIButton UIControl UIView
None
None
Entity (class, struct) vs Behaviour (protocol)
UIView Framable
UIImageView ImageRenderable, Framable
UIButton Tappable, ImageRenderable, Framable
UITableViewCell UICollectionViewCell Reusable, Framable
UIScrollView Scrollable, Framable
UITableView UICollectionView Listable, Scrollable, Framable
UI Entities is collection of behaviours…
..computed variables, extensions, values types, immutability, functional programming, generics, enums,
associative types/ values..
thinking in protocol..
None