Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
190
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
210
Xcode keyboard tips
lachlanroche
1
70
Xcode build script tips
lachlanroche
0
89
Introducing Datomic
lachlanroche
0
120
Introducing Xamarin
lachlanroche
0
90
Other Decks in Programming
See All in Programming
Webの地図
yosuke_furukawa
PRO
6
4.7k
速習iPhone Duo対応
yuukiw00w
1
710
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
520
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
4.3k
The Rails Doctrine Decade
koic
2
340
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
0
170
SREの越境 / SRE Collaboration
y0hgi
2
270
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
350
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
160
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
160
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Paper Plane
katiecoart
PRO
4
53k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
250
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
700
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Building Adaptive Systems
keathley
44
3.2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
Claude Code のすすめ
schroneko
67
230k
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