Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
420
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
180
Combine! All the things
riteshhh
3
690
Deep dive into Protocols
riteshhh
1
430
How to be a POP-Star
riteshhh
1
360
Other Decks in Technology
See All in Technology
Symfony AI in Action
el_stoffel
2
310
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
IaC を使いたくないけどポリシー管理をどうにかしたい
kazzpapa3
1
210
オープンデータの内製化から分かったGISデータを巡る行政の課題
naokim84
2
1.3k
生成AIシステムとAIエージェントに関する性能や安全性の評価
shibuiwilliam
2
300
OpenShiftのBGPサポート - MetalLB+FRR-k8s編
orimanabu
0
130
Multimodal AI Driving Solutions to Societal Challenges
keio_smilab
PRO
1
100
私のRails開発環境
yahonda
0
170
レガシーシステム刷新における TypeSpec スキーマ駆動開発のすゝめ
tsukuha
4
890
mablでリグレッションテストをデイリー実行するまで #mablExperience
bengo4com
0
460
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
110
TROCCO 2025年の進化をデモで振り返る
__allllllllez__
0
270
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Embracing the Ebb and Flow
colly
88
4.9k
The Cult of Friendly URLs
andyhume
79
6.7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Side Projects
sachag
455
43k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Writing Fast Ruby
sferik
630
62k
Designing for humans not robots
tammielis
254
26k
Balancing Empowerment & Direction
lara
5
770
Faster Mobile Websites
deanohume
310
31k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
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