Skip to content

Instantly share code, notes, and snippets.

Last active December 12, 2020 07:04
  • Star 149 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Declare on your main init that all other init methods should call. It's a nice additional semantic warning. Works with Xcode 5.1 and above. Not tested with earlier variants, but should just be ignored. A reference to this macro shortly appeared in…
#if __has_attribute(objc_designated_initializer)
#define NS_DESIGNATED_INITIALIZER __attribute((objc_designated_initializer))
Copy link

Mazyod commented Jul 9, 2014

@nzhuk This is so stupid :( And when you use the unavailable attribute, you can't redefine that method in the subclass in order to make it available again >__< .. Need.. Swift.. Now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment