#include <objc/message.h>
- (IBAction)buttonevent:(id)sender {
NSDictionary *itemDic = [[NSDictionary alloc]init];
  SEL s = NSSelectorFromString(@"eventname:");
        if ([self respondsToSelector:s]) {
            ((id (*)(id, SEL, NSDictionary*))objc_msgSend)(self, s, itemDic);
        }
}
- (void) eventname:(id)obj
{
    //do something...
}
 
沒有留言:
張貼留言