Skip to content

Instantly share code, notes, and snippets.

@AtomicCat
Created February 21, 2013 01:51
Show Gist options
  • Select an option

  • Save AtomicCat/5001293 to your computer and use it in GitHub Desktop.

Select an option

Save AtomicCat/5001293 to your computer and use it in GitHub Desktop.
Class fun
#import <Foundation/Foundation.h>
#import <objc/objc.h>
#import <objc/runtime.h>
#import <objc/message.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
Class stringClass = [NSString class];
NSLog(@"foo: %@", objc_msgSend(stringClass, @selector(stringWithFormat:), @"bar"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment