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
180
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
4.9k
GMTC 2019 - 在分歧中发展,2019 我们能用 Swift 做什么
onevcat
0
910
从 Swift 到机器学习
onevcat
2
940
iOS Dev - The Dark Side
onevcat
0
120
面向协议编程与 Cocoa 的邂逅
onevcat
14
4.7k
Swift 3 - From Expert to Beginner
onevcat
2
210
如何打造一个让人愉快的框架
onevcat
4
22k
JSPatch Introduction
onevcat
0
180
Unity Memory
onevcat
0
130
Other Decks in Programming
See All in Programming
Jaspr Dart Web Framework 박제창 @Devfest 2024
itsmedreamwalker
0
150
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.9k
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
6k
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
8
1.9k
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
300
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
0
100
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
1
420
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.4k
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
28
4.1k
return文におけるstd::moveについて
onihusube
1
1.4k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Into the Great Unknown - MozCon
thekraken
34
1.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Building Applications with DynamoDB
mza
93
6.2k
A better future with KSS
kneath
238
17k
Documentation Writing (for coders)
carmenintech
67
4.5k
Thoughts on Productivity
jonyablonski
68
4.4k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
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