Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Thinking in Swift!
Ritesh Gupta
January 21, 2017
Technology
3
240
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
95
Combine! All the things
riteshhh
3
590
Deep dive into Protocols
riteshhh
1
180
How to be a POP-Star
riteshhh
1
160
Other Decks in Technology
See All in Technology
01_ユーザーリサーチ実施の進め方
kouzoukaikaku
0
920
メドレー エンジニア採用資料/ Medley Engineer Guide
medley
3
5.2k
AI Builderについて
miyakemito
1
1k
ポストモーテム運用を支える文化と技術 / Culture and Technology Supporting Postmortem Operations
chaspy
2
170
インフラ技術基礎勉強会 開催概要
toru_kubota
0
190
NGINXENG JP#2 - 3-NGINX Plus・プロダクトのアップデート
hiropo20
0
260
立ち止まっても、寄り道しても / even if I stop, even if I take a detour
katoaz
0
1.3k
Google Cloud Workflows: API automation, patterns and best practices
glaforge
0
120
MLOps Workshopでの学びと弥生の研究開発基盤 / takeaways from MLOps workshop and YAYOI's research and development infrastructure
yayoi_dd
0
300
都市ARの作り方 PLATEAU ✖︎ Geospatial API
41h0_shiho
1
340
OpenShiftでスポットVMを使おう.pdf
jpishikawa
1
420
OpenShiftのリリースノートを整理してみた
loftkun
2
460
Featured
See All Featured
Three Pipe Problems
jasonvnalue
89
8.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
239
19k
WebSockets: Embracing the real-time Web
robhawkes
58
6k
In The Pink: A Labor of Love
frogandcode
132
21k
How STYLIGHT went responsive
nonsquared
89
4.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
396
63k
Clear Off the Table
cherdarchuk
79
290k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
224
50k
Design by the Numbers
sachag
271
18k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
31
20k
Imperfection Machines: The Place of Print at Facebook
scottboms
254
12k
Robots, Beer and Maslow
schacon
154
7.3k
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