Skip to content

Instantly share code, notes, and snippets.

@cacaodev
Created November 3, 2008 16:29
Show Gist options
  • Save cacaodev/21905 to your computer and use it in GitHub Desktop.
Save cacaodev/21905 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