Skip to content

Instantly share code, notes, and snippets.

@cacaodev
Created November 2, 2008 19:12
Show Gist options
  • Save cacaodev/21732 to your computer and use it in GitHub Desktop.
Save cacaodev/21732 to your computer and use it in GitHub Desktop.
var string = @"/a/b";
var selector = @selector(lastPathComponent);
var invocation = [CPInvocation invocationWithMethodSignature:nil];
[invocation setTarget:string];
[invocation setSelector:selector];
var result = [invocation invoke];
CPLogConsole("RESULT = "+ result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment