Theocacao
Leopard
Design Element
Comment on "Replacing Objective-C Methods at Runtime"
by Bryan Elliott — May 04
+(NSArray*) listInstanceMethods { NSUInteger outCount; NSUInteger i; // struct objc_method * Method* list = class_copyMethodList([self class], &outCount); Method meth; NSMutableArray* ret = [[NSMutableArray alloc] initWithCapacity:outCount]; /* for each item in list, copy out the text selector */ for (i=0; imethod_name)]; } free(list); return [NSArray arrayWithArray:ret]; }
I get a warning any time I try to directly access properties of Methods. I ask you, if method_name is deprecated, what IS the approved way of getting the selector for a given Method struct?
Back to "Replacing Objective-C Methods at Runtime"
Design Element

Copyright © Scott Stevenson 2004-2015