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
Objective-C Runtime Swizzle
Search
Wei Wang
November 20, 2014
Programming
0
200
Objective-C Runtime Swizzle
Wei Wang
November 20, 2014
Tweet
Share
More Decks by Wei Wang
See All by Wei Wang
網路之難,難於上青天 - iPlayground 2019
onevcat
11
5.1k
GMTC 2019 - 在分歧中发展,2019 我们能用 Swift 做什么
onevcat
0
1k
从 Swift 到机器学习
onevcat
2
1k
iOS Dev - The Dark Side
onevcat
0
140
面向协议编程与 Cocoa 的邂逅
onevcat
14
4.8k
Swift 3 - From Expert to Beginner
onevcat
2
220
如何打造一个让人愉快的框架
onevcat
4
22k
JSPatch Introduction
onevcat
0
200
Unity Memory
onevcat
0
150
Other Decks in Programming
See All in Programming
PicoRuby on Rails
makicamel
2
130
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
760
Deep Dive into ~/.claude/projects
hiragram
14
2.6k
AIともっと楽するE2Eテスト
myohei
6
2.6k
Goで作る、開発・CI環境
sin392
0
230
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
420
XP, Testing and ninja testing
m_seki
3
250
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
790
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
200
新メンバーも今日から大活躍!SREが支えるスケールし続ける組織のオンボーディング
honmarkhunt
5
7.4k
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
530
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
130
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
A better future with KSS
kneath
238
17k
Typedesign – Prime Four
hannesfritz
42
2.7k
Writing Fast Ruby
sferik
628
62k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Balancing Empowerment & Direction
lara
1
430
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Transcript
0CKFDUJWF$3VOUJNF 4XJ[[MF࣮ફ Ԧቨ
ࣗݾհ w ઌ݄ೖ͔ࣾΓɺલຊདྷͨ w J04։ൃ͙Β͍ɻલ৬6OJUZ% w ࠓ-JOF"ET4%,ͷࣄΛ୲͍ͯ͠Δ w ࠷ۙ"OESPJEษڧத w
IUUQHJUIVCDPNPOFWDBU
Ͳ͏ͯ͠0CKFDUJWF$͕ੜ͖Δ ͔Βɺࠓ·Ͱࡀա͗ɻݴޠʹͷ͓دΓ
None
4NBMM5BML ϝοηʔδૹ৴ 4XJ[[MJOH ϝλݴޠ $ͱ$ ޓ "3$ "TTPDJBUFE 0CKFDU --7.$MBOH
($% ັྗతͳ ॊೈੑ
4XJ[[MJOH
.FUIPE$BMMJOH ClassName *object = [[ClassName alloc] init]; [object doItWithA:a]; objc_msgSend(object,
@selector(doItWithA:), a); %JTQBUDI5BCMF .FUIPE *.1 @selector(doIt) doIt @selector(doItWithA:) doItWithA: - (void)doIt { //... } - (void)doItWithA:(id)a { //... }
.FUIPE4XJ[[MJOH %JTQBUDI5BCMF .FUIPE *.1 @selector(doIt) doIt @selector(doItWithA:) doItWithA: @selector(alt_doItWithA:) alt_doItWithA:
- (void)doIt { //... } - (void)doItWithA:(id)a { //... } - (void)alt_doItWithA:(id)a { //... } EP*U8JUI"ͱBMU@EP*U8JUI"Λ4XJ[[MF͠·͢
.FUIPE4XJ[[MJOH %JTQBUDI5BCMF .FUIPE *.1 @selector(doIt) doIt @selector(doItWithA:) doItWithA: @selector(alt_doItWithA:) alt_doItWithA:
- (void)doIt { //... } - (void)doItWithA:(id)a { //... } - (void)alt_doItWithA:(id)a { //... } EP*U8JUI"ͱBMU@EP*U8JUI"Λ4XJ[[MF͠·͢
.FUIPE4XJ[[MJOH %JTQBUDI5BCMF .FUIPE *.1 @selector(doIt) doIt @selector(doItWithA:) doItWithA: @selector(alt_doItWithA:) alt_doItWithA:
- (void)doIt { //... } - (void)doItWithA:(id)a { //... } - (void)alt_doItWithA:(id)a { //... } *.1Λަ͠·͢
%FNP -JOF"ET4%,ΦϦΤϯςʔγϣϯ
αϚϦʔ w ΫϥεͷϝιουςʔϒϧΛॻ͖͑Δ w ڧྗͰ͋ΔͨΊཚ༻Λආ͚Δ͖ w ඞͣަલͷϝιʔυΛݺͼ·͢ w ΫϥεͷΧςΰϦʔͱ MPBE࿈ܞ͕Φεεϝ
'"2 NBJMXFJXBOH!MJOFDPSQDPN )JQ$IBUPOFWDBU %FNPDPEFIUUQTHJUIVCDPNPOFWDBU-BOETDBQF7JFX$POUSPMMFS%FNP