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
Escaping Closures in Swift - 公司內分享會
Search
Li-Hsuan Chen
September 23, 2016
Programming
1
240
Escaping Closures in Swift - 公司內分享會
Li-Hsuan Chen
September 23, 2016
Tweet
Share
More Decks by Li-Hsuan Chen
See All by Li-Hsuan Chen
The UX thinking of PAY ID
vc7
2
460
From Onboarding to Value Delivering in iOS
vc7
0
280
Merciless Refactoring
vc7
0
770
Protocol 的實例、測試和心得
vc7
2
800
共有経済
vc7
0
180
.gitignore
vc7
1
99
Git Workshop 03
vc7
0
130
Git Workshop 02
vc7
0
120
Git Workshop 01
vc7
0
180
Other Decks in Programming
See All in Programming
TanStack DB ~状態管理の新しい考え方~
bmthd
2
330
新世界の理解
koriym
0
140
WebAssemblyインタプリタを書く ~Component Modelを添えて~
ruccho
1
910
ワープロって実は計算機で
pepepper
2
1.4k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
170
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
200
管你要 trace 什麼、bpftrace 用下去就對了 — COSCUP 2025
shunghsiyu
0
470
書き捨てではなく継続開発可能なコードをAIコーディングエージェントで書くために意識していること
shuyakinjo
1
300
CEDEC2025 長期運営ゲームをあと10年続けるための0から始める自動テスト ~4000項目を50%自動化し、月1→毎日実行にした3年間~
akatsukigames_tech
0
150
MLH State of the League: 2026 Season
theycallmeswift
0
160
自作OSでDOOMを動かしてみた
zakki0925224
1
1.4k
実践 Dev Containers × Claude Code
touyu
1
240
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Bash Introduction
62gerente
614
210k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
The Language of Interfaces
destraynor
160
25k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Producing Creativity
orderedlist
PRO
347
40k
Six Lessons from altMBA
skipperchong
28
4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Transcript
&TDBQJOH$MPTVSFT ꤫խ愴蠩 @escaping
䖰ㆭ酭鷗鷗ㆭ酭
殹DMPTVSF⡲捀侸⫄Ⰵ♧⦐NFUIPE儘 鸏⦐DMPTVSF剚㖈NFUIPE㛂遤㸤䧭䖕 䩞剚鄄㛂遤儘㽠䗳갭䭸㹁䧭FTDBQJOHDMPTVSF
⾲㨥䞕㞯 雊䧮⦛⢵䢩䢩⸈匌銯
class A { func someMethod(closure: () -> Void) { closure()
} } 鸏♧媯♶剚剤DPNQJMFSFSSPS
䞕㞯♧ 鸏⦐DMBTT剤⦐荈㹁纏涸RVFVF ⢵嶋⻋♶ずNFUIPE⫄Ⰵ涸DMPTVSFT
class A { var closures: [() -> Void]? = []
func someMethod(closure: () -> Void) { self.closures?.append(closure) } } 㖈4XJGUⴀ⢵⟃鸏媯♶剚剤㉏겗
class A { var closures: [() -> Void]? = []
func someMethod(closure: () -> Void) { self.closures?.append(closure) } }
None
class A { var closures: [() -> Void]? = []
func someMethod(closure: @escaping () -> Void) { self.closures?.append(closure) } }
㼭穡 • @escaping ˖ ⫄ⰅNFUIPE涸DMPTVSF㥶卓銴㖈NFUIPE GVODUJPO涸SFUVSO䖕䩞㛂遤㽠䗳갭銴⸈♳ @escaping ˖ @noescapeJNQMJDJUMZ ˖
DMPTVSF⡲捀侸갸鏤鿪僽@noescape
䞕㞯✳ 䧮欽痧♲倰MJCSBSZ涸NFUIPE FH"MBNPSF
〫銴➮剤FTDBQJOH ⡹㽠銴騈衽!FTDBQJOH
class B { var closures: [() -> Void]? = []
func anotherMethod(closure: @escaping () -> Void) { self.closures?.append(closure) } }
class A { func someMethod(closure: () -> Void) { B().anotherMethod(closure:
closure) } } class B { var closures: [() -> Void]? = [] func anotherMethod(closure: @escaping () -> Void) { self.closures?.append(closure) } } 㖈4XJGUⴀ⢵⟃鸏垺㻨♶剚剤㉏겗
class A { func someMethod(closure: () -> Void) { B().anotherMethod(closure:
closure) } } class B { var closures: [() -> Void]? = [] func anotherMethod(closure: @escaping () -> Void) { self.closures?.append(closure) } }
None
class A { func someMethod(closure: @escaping () -> Void) {
B().anotherMethod(closure: closure) } } class B { var closures: [() -> Void]? = [] func anotherMethod(closure: @escaping () -> Void) { self.closures?.append(closure) } }
籏穡♧♴
䖰ㆭ酭鷗鷗ㆭ酭
鷗ⴀ㛂遤涸眕㕠
Ⱖ➮ ˖ 〳⟃鍑对SFUBJODZDMF涸㉏겗 4& 䖊㻜뀿 ˖ OPFTDBQFDMPTVSFTIBWFBMTPBMXBZTCFFOUIF QSFGFSSFEEFGBVMU
TJODFUIFZFMJNJOBUFBDMBTT PGSFUBJODZDMFJTTVFT ˖ QSPUPDPM涸㹁纏 ˖ 㥶卓㻜⡲QSPUPDPM涸倰岁儘銴⸈!FTDBQJOH QSPUPDPM⚥鑪倰岁涸㹁纏⛳銴⸈♳
5IBOL:PV