Created
November 7, 2013 17:06
-
-
Save hcrub/7358095 to your computer and use it in GitHub Desktop.
Creating a NSClass during Objective C's Runtime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creating a class at runtime can be accomplished using the objc_allocateClassPair function in objc/runtime.h. | |
/** | |
* objc_allocateClassPair | |
* | |
* (Class superclass, const char *name, size_t extraBytes) | |
**/ | |
Class runtimeClass = objc_allocateClassPair([NSObject class], "ThisRuntimeClass", 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment