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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
lachlanroche
October 06, 2015
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
200
Xcode keyboard tips
lachlanroche
1
60
Xcode build script tips
lachlanroche
0
85
Introducing Datomic
lachlanroche
0
110
Introducing Xamarin
lachlanroche
0
81
Other Decks in Programming
See All in Programming
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
AIエージェントで 変わるAndroid開発環境
takahirom
2
680
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
110
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
130
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
220
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
790
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
650
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
関数型プログラミングのメリットって何だろう?
wanko_it
0
180
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
Become a Pro
speakerdeck
PRO
31
6k
Visualization
eitanlees
152
17k
Prompt Engineering for Job Search
mfonobong
0
380
Leo the Paperboy
mayatellez
8
1.9k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Navigating Weather and Climate Data
rabernat
0
380
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
How to Talk to Developers About Accessibility
jct
2
400
Raft: Consensus for Rubyists
vanstee
141
7.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
A designer walks into a library…
pauljervisheath
211
24k
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