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
380
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
170
Combine! All the things
riteshhh
3
680
Deep dive into Protocols
riteshhh
1
390
How to be a POP-Star
riteshhh
1
320
Other Decks in Technology
See All in Technology
サーバーレスで楽しよう!お気軽に始められる3つのポイント / Have fun with Serverless!
_kensh
2
230
あなたの興味は信頼性?それとも生産性? SREとしてのキャリアに悩むみなさまに伝えたい選択肢
jacopen
6
3.1k
プロダクト観点で考えるデータ基盤の育成戦略 / Growth Strategy of Data Analytics Platforms from a Product Perspective
yamamotoyuta
0
200
【Λ(らむだ)】アップデート機能振り返りΛ編 / PADjp20250127
lambda
0
120
マルチデータプロダクト開発・運用に耐えるためのデータ組織・アーキテクチャの遷移
mtpooh
0
100
2025/1/29 BigData-JAWS 勉強会 #28 (re:Invent 2024 re:Cap)/new-feature-preview-q-in-quicksight-scenarios-tried-and-tested
emiki
0
310
アーキテクチャわからん、の話
shirayanagiryuji
0
150
エラーバジェット枯渇の原因 - 偽陽性との戦い -
phaya72
1
100
カスタムインストラクションでGitHub Copilotをカスタマイズ!
07jp27
6
430
現実的なCompose化戦略 ~既存リスト画面の置き換え~
sansantech
PRO
0
160
Postman Vaultを使った秘密情報の安全な管理
nagix
3
130
CNAPPから考えるAWSガバナンスの実践と最適化
yuobayashi
5
680
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Documentation Writing (for coders)
carmenintech
67
4.6k
The World Runs on Bad Software
bkeepers
PRO
67
11k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
520
Faster Mobile Websites
deanohume
305
30k
Facilitating Awesome Meetings
lara
51
6.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
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