Created
July 19, 2013 22:14
-
-
Save streeter/6042730 to your computer and use it in GitHub Desktop.
Bless and designate certain initializers as the proper initializer to use.
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
// Bless a certain initializer at compile time | |
// | |
// Sample usage: | |
// - (instancetype)initWithObject:(id)object | |
// - (instancetype)init ECDesignatedInitializer(initWithObject:); | |
// | |
#define ECDesignatedInitializer(__SEL__) __attribute__((unavailable("Invoke the designated initializer `" # __SEL__ "` instead."))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment