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
990
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
190
Unity Memory
onevcat
0
140
Other Decks in Programming
See All in Programming
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
800
CursorはMCPを使った方が良いぞ
taigakono
1
170
A2A プロトコルを試してみる
azukiazusa1
2
1.1k
童醫院敏捷轉型的實踐經驗
cclai999
0
190
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
880
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
220
エンジニア向け採用ピッチ資料
inusan
0
160
Deep Dive into ~/.claude/projects
hiragram
8
1.5k
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
520
XSLTで作るBrainfuck処理系
makki_d
0
210
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
120
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
11
2k
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
Music & Morning Musume
bryan
46
6.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Navigating Team Friction
lara
187
15k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
210
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