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
370
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
380
How to be a POP-Star
riteshhh
1
310
Other Decks in Technology
See All in Technology
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
1.2k
Work as an App Engineer
lycorp_recruit_jp
0
360
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
180
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
27
23k
AWS re:Invent 2024 ふりかえり勉強会
yhana
0
450
OCI技術資料 : ファイル・ストレージ 概要
ocise
3
11k
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
550
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
320
podman_update_2024-12
orimanabu
1
290
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
3
280
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.9k
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
320
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Into the Great Unknown - MozCon
thekraken
33
1.5k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
110
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Speed Design
sergeychernyshev
25
670
Build your cross-platform service in a week with App Engine
jlugia
229
18k
GraphQLの誤解/rethinking-graphql
sonatard
67
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