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
0
160
Introducing the iOS Responder Chain
Presented at Brisbane Cocoaheads, October 2015
lachlanroche
October 06, 2015
Tweet
Share
More Decks by lachlanroche
See All by lachlanroche
iPad Multitasking in iOS9
lachlanroche
0
180
Xcode keyboard tips
lachlanroche
1
51
Xcode build script tips
lachlanroche
0
74
Introducing Datomic
lachlanroche
0
66
Introducing Xamarin
lachlanroche
0
66
Other Decks in Programming
See All in Programming
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1.1k
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
210
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
120
CSC307 Lecture 08
javiergs
PRO
0
660
Package Management Learnings from Homebrew
mikemcquaid
0
190
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
230
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.4k
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
970
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
AtCoder Conference 2025
shindannin
0
1k
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
240
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Skip the Path - Find Your Career Trail
mkilby
0
52
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
Darren the Foodie - Storyboard
khoart
PRO
2
2.3k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
420
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
WENDY [Excerpt]
tessaabrams
9
36k
Fireside Chat
paigeccino
41
3.8k
The agentic SEO stack - context over prompts
schlessera
0
630
Code Reviewing Like a Champion
maltzj
527
40k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
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