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
Introducing the iOS Responder Chain
Search
lachlanroche
October 06, 2015
Programming
170
0
Share
Introducing the iOS Responder Chain
Presented at Brisbane Cocoaheads, October 2015
lachlanroche
October 06, 2015
More Decks by lachlanroche
See All by lachlanroche
iPad Multitasking in iOS9
lachlanroche
0
180
Xcode keyboard tips
lachlanroche
1
55
Xcode build script tips
lachlanroche
0
78
Introducing Datomic
lachlanroche
0
77
Introducing Xamarin
lachlanroche
0
70
Other Decks in Programming
See All in Programming
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
280
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
160
モダンOBSプラグイン開発
umireon
0
190
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
390
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
1
110
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
140
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
540
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
3
2.7k
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.2k
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
250
Mind Mapping
helmedeiros
PRO
1
140
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
170
The Pragmatic Product Professional
lauravandoore
37
7.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
160
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Building the Perfect Custom Keyboard
takai
2
720
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
The Cult of Friendly URLs
andyhume
79
6.8k
Darren the Foodie - Storyboard
khoart
PRO
3
3.1k
The SEO identity crisis: Don't let AI make you average
varn
0
430
Transcript
Introducing the Responder Chain Brisbane Cocoaheads Oct 2015 @lachlanroche
None
UIResponder • UIApplication • UIView (UIWindow) • UIViewController • SKNode
• AppDelegate in a new project
UIApplication + sendAction:to:from:forEvent • This is what gets called when
a wired up IBAction is triggered
to target: AnyObject? • “The object to receive the action
message. If to is nil, the app sends the message to the first responder, from whence it progresses up the responder chain until it is handled.” • First Responder in IB means target == nil
“…from whence it progresses up the responder chain until it
is handled.” • Initial receiver is the First Responder. • canPerformAction(_ action: Selector, withSender sender: AnyObject?) -> Bool • nextResponder() -> UIResponder?
None
Dismiss keyboard? • sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil
UITableViewCell • Works with UITableView to implement context menus. •
If you want to send an action via the responder chain, override canPerformAction:withSender:
Finding First Responder static __weak id currentFirstResponder; @implementation UIResponder (FirstResponder)
+ (id) currentFirstResponder { currentFirstResponder = nil; [[UIApplication sharedApplication] sendAction:@selector(findFirstResponder:) to:nil from:nil forEvent:nil]; return currentFirstResponder; } - (void) findFirstResponder:(id)sender { currentFirstResponder = self; } @end