13th
Thu
その場で関数ポインタ型にキャストする方法
Objective-
1 SEL selector = @selector(drawRect:); 2 Method method = class_getInstanceMet hod([UISearchBa r class], selector); 3 IMP drawRect = method_get Implementa tion(method); 4 ((void(*)(id, SEL, CGRect))drawRect)(self, selector, rect);
こんな感じにすればOkです。
posted by
genki
on Thu 13 Nov 2008
at 01:15