Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <objc/message.h>
- #include <stdio.h>
- #if !defined(OBJC_ROOT_CLASS)
- # if __has_attribute(objc_root_class)
- # define OBJC_ROOT_CLASS __attribute__((objc_root_class))
- # else
- # define OBJC_ROOT_CLASS
- # endif
- #endif
- OBJC_ROOT_CLASS
- @interface TestClass
- +(void) testMethod;
- @end
- @implementation TestClass
- +(void) testMethod
- {
- printf("testMethod\n");
- }
- @end
- int main()
- {
- /*Class cls = objc_getClass("TestClass");
- SEL sel = sel_getUid("testMethod");
- objc_msgSend(cls, sel);*/
- //[TestClass testMethod];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement