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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ritesh Gupta
January 21, 2017
Technology
3
430
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
190
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
配列に見る bash と zsh の違い
kazzpapa3
1
140
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
230
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
640
Greatest Disaster Hits in Web Performance
guaca
0
230
プロポーザルに込める段取り八分
shoheimitani
1
230
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
210
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
390
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
450
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
350
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
920
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Design in an AI World
tapps
0
140
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
66
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
64
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
How GitHub (no longer) Works
holman
316
140k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
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