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
350
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
160
Combine! All the things
riteshhh
3
670
Deep dive into Protocols
riteshhh
1
350
How to be a POP-Star
riteshhh
1
300
Other Decks in Technology
See All in Technology
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
120
【LT】ソフトウェア産業は進化しているのか? -Javaの想い出とともに- #jjug_ccc
takabow
0
150
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
1
370
クライアントサイドでよく使われる Debounce処理 をサーバサイドで3回実装した話
yoshiori
1
130
Trusted Types API と Vue.js
lycorptech_jp
PRO
1
300
初心者に Vue.js を 教えるには
tsukuha
3
210
SwiftSyntaxでUIKitとSwiftUIの使用率を完璧に計測できちゃう件について
ldf_tech
0
160
AI Builder について
miyakemito
1
130
内製化によるシステムモダナイゼーションの実践
kazokmr
3
530
ガバメントクラウド単独利用方式におけるIaC活用
techniczna
3
180
Mackerelが取り組むオブザーバビリティ - Mackerel Tech Day
mackerelio
0
330
日経ビジュアルデータにおける スクロールテリングと地図/nikkei-tech-talk-26
nikkei_engineer_recruiting
0
160
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
39
2.4k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Building an army of robots
kneath
302
42k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.1k
Why Our Code Smells
bkeepers
PRO
334
57k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Unsuck your backbone
ammeep
668
57k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
The Cult of Friendly URLs
andyhume
78
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