Skip to content

Instantly share code, notes, and snippets.

View atomkirk's full-sized avatar

Adam Kirk atomkirk

View GitHub Profile
#define MSDesignatedInitializer(__SEL__) __attribute__((unavailable("Invoke the designated initializer `" # __SEL__ "` instead.")))
// Sample usage:
- (id)initWithObject:(id)object;
- (id)init MSDesignatedInitializer(initWithObject:); // <- This even gets auto-complete.
// Now calling init on this class would throw a warning.