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
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
200
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
GitHub Actions侵害 — 相次ぐ事例を振り返り、次なる脅威に備える
flatt_security
8
4.9k
【Oracle Cloud ウェビナー】データ主権はクラウドで守れるのか?NTTデータ様のOracle Alloyで実現するソブリン対応クラウドの最適解
oracle4engineer
PRO
3
110
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
76k
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
200
FlutterでPiP再生を実装した話
s9a17
0
210
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
150
夢の無限スパゲッティ製造機 #phperkaigi
o0h
PRO
0
380
「通るまでRe-run」から卒業!落ちないテストを書く勘所
asumikam
2
770
「捨てる」を設計する
kubell_hr
0
410
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
130
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
knj
0
300
Change Calendarで今はOK?を仕組みにする
tommy0124
1
120
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
86
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
240
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.6k
Side Projects
sachag
455
43k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
490
Prompt Engineering for Job Search
mfonobong
0
230
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
160
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