Skip to content

Instantly share code, notes, and snippets.

@gabriel
Created July 1, 2009 08:49
Show Gist options
  • Save gabriel/138684 to your computer and use it in GitHub Desktop.
Save gabriel/138684 to your computer and use it in GitHub Desktop.
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[self methodSignatureForSelector:@selector(listWithOffset:limit:)]];
[theInvocation setSelector:@selector(listWithOffset:limit:)];
[theInvocation setTarget:self];
NSInteger offset = 40;
[theInvocation setArgument:&offset atIndex:2];
NSInteger limit = 20;
[theInvocation setArgument:&limit atIndex:3];
[invocation performSelector:@selector(invoke) onThread:thread withObject:nil waitUntilDone:NO];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment