Name: Anonymous 2009-11-22 11:45
So this faggot iPhone developer has been bitching to me about how C++ is a shitty language and how Objective-C is the greatest thing on the planet. How can I get back at him?
// call target selector with a, b, c
assert(target);
assert(sel);
NSMethodSignature* signature = [[target class] instanceMethodSignatureForSelector:sel];
assert([signature numberOfArguments] == 3);
NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:signature];
[invocation setTarget:target];
[invocation setArgument:&a atIndex:2];
[invocation setArgument:&b atIndex:3];
[invocation setArgument:&c atIndex:4];
[invocation invoke];
}