SEL actionSEL = NSSelectorFromString(methodStr);
if ([self respondsToSelector:actionSEL]) {
IMP actionIMP = [self methodForSelector:actionSEL];
void (*func)(id, SEL) = (void *)actionIMP;
func(self, actionSEL);
}
网友评论