Created
November 13, 2015 22:04
-
-
Save abbeyjackson/c1bbbffb07f5578d250b to your computer and use it in GitHub Desktop.
How to make methods unavailable, make compiler warnings / errors using #define statements
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
#define __SXMWebAction__UnavailableConstructor__(x) __attribute__((unavailable("This class must be instantiated using '"x"WithJSON:' or '"x"WithHTMLJSON:'"))) | |
#pragma mark - Unavailable Super Methods | |
- (id)init __SXMWebAction__UnavailableConstructor__("init"); | |
+ (id)new __SXMWebAction__UnavailableConstructor__("webAction"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment