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
430
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
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
250
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
210
Exadata Fleet Update
oracle4engineer
PRO
0
1.1k
Prox Industries株式会社 会社紹介資料
proxindustries
0
180
StrandsAgentsで構築したAIエージェントにMCP Apps機能を追加してみた
kmiya84377
0
120
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
300
配列に見る bash と zsh の違い
kazzpapa3
3
190
ECSネイティブのBlue/Green デプロイを攻略しよう ~CodeDeployとの違いから、デプロイフロー実装まで~
ideaws
2
240
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
400
Context Engineeringの取り組み
nutslove
0
440
プロポーザルに込める段取り八分
shoheimitani
1
770
LiDARが変えたARの"距離感"
zozotech
PRO
0
120
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
110
WCS-LA-2024
lcolladotor
0
460
GitHub's CSS Performance
jonrohan
1032
470k
So, you think you're a good person
axbom
PRO
2
1.9k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
220
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
200
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Building AI with AI
inesmontani
PRO
1
720
Design in an AI World
tapps
0
150
BBQ
matthewcrist
89
10k
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