iPhone object-c 的reflection使用方法
摘要:
// Without reflection Foo *foo = [[Foo alloc] init]; [foo hello]; // With reflection Class cls = NSClassFromString(@"Foo"); id foo = [[cls alloc] init]; SEL selector = NSSelectorFromString(@"hello"); [foo performSelector:selector withObject:nil]; 阅读全文
posted @ 2011-05-21 15:06
火星人驾到
阅读(200)
评论(0)
推荐(0)
浙公网安备 33010602011771号