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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ritesh Gupta
January 21, 2017
Technology
3
440
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
190
Combine! All the things
riteshhh
3
700
Deep dive into Protocols
riteshhh
1
450
How to be a POP-Star
riteshhh
1
380
Other Decks in Technology
See All in Technology
詳解 強化学習 / In-depth Guide to Reinforcement Learning
prinlab
0
370
建設DXを支えるANDPAD: 2025年のセキュリティの取り組みと卒業したいセキュリティ
andpad
0
170
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
110
脳が溶けた話 / Melted Brain
keisuke69
1
910
事例から紐解くSHIFT流QA支援 ~大規模プロジェクトの品質管理支援、QA組織立ち上げ~ / 20260320 Nozomu Koketsu
shift_evolve
PRO
0
140
プログラミング不要! テスト自動化における生成AI使いこなし術
magicpod
1
110
Phase10_組織浸透_データ活用
overflowinc
0
1.5k
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
120
_Architecture_Modernization_から学ぶ現状理解から設計への道のり.pdf
satohjohn
2
740
「通るまでRe-run」から卒業!落ちないテストを書く勘所
asumikam
2
480
スピンアウト講座04_ルーティン処理
overflowinc
0
1.1k
形式手法特論:SMT ソルバで解く認可ポリシの静的解析 #kernelvm / Kernel VM Study Tsukuba No3
ytaka23
1
770
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Facilitating Awesome Meetings
lara
57
6.8k
Typedesign – Prime Four
hannesfritz
42
3k
Optimizing for Happiness
mojombo
378
71k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Ethics towards AI in product and experience design
skipperchong
2
240
The SEO Collaboration Effect
kristinabergwall1
0
400
Code Review Best Practice
trishagee
74
20k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
300
Speed Design
sergeychernyshev
33
1.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