2015-04-09から1日間の記事一覧
Runtime API に method_exchangeImplementations というメソッド置換を行う関数がある。 メソッド交換、メソッド置き換え、メソッド入れ替えなどとも呼ばれる。 実装は簡単 objc/runtime.h をimportして Class cls; Method m1 = class_getInstanceMethod(cls…
Runtime API に method_exchangeImplementations というメソッド置換を行う関数がある。 メソッド交換、メソッド置き換え、メソッド入れ替えなどとも呼ばれる。 実装は簡単 objc/runtime.h をimportして Class cls; Method m1 = class_getInstanceMethod(cls…