Last active
December 23, 2015 06:06
-
-
Save ourui/d1032906eb2ce3706718 to your computer and use it in GitHub Desktop.
Make all categories in the current file loadable without using -load-all.
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
/** Make all categories in the current file loadable without using -load-all. | |
* | |
* Normally, compilers will skip linking files that contain only categories. | |
* Adding a call to this macro adds a dummy class, which causes the linker | |
* to add the file. | |
* | |
* @param UNIQUE_NAME A globally unique name. | |
*/ | |
#define MAKE_CATEGORIES_LOADABLE(UNIQUE_NAME) @interface FORCELOAD_##UNIQUE_NAME : NSObject @end @implementation FORCELOAD_##UNIQUE_NAME @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment