Objective-Cで、Method構造体からCレベルの関数ポインタを取得する方法のメモです。

以前は、

   1  Method *method = class_getInstanceMethod(class, selector);
   2  IMP imp = method->method_imp;

という感じで取得出来ていたみたいですが、現在はDeprecatedとなっており、 以下のようにする必要があるようです。

   1  IMP imp = method_getImplementation(method);

posted by Png genki on Thu 9 Oct 2008 at 02:31

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry943
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ