Skip to content

Instantly share code, notes, and snippets.

@steipete
Created May 28, 2013 17:35
Show Gist options
  • Save steipete/5664543 to your computer and use it in GitHub Desktop.
Save steipete/5664543 to your computer and use it in GitHub Desktop.
// Defines a yet undocumented method to add a warning if super isn't called.
#ifndef NS_REQUIRES_SUPER
#if __has_attribute(objc_requires_super)
#define NS_REQUIRES_SUPER __attribute((objc_requires_super))
#else
#define NS_REQUIRES_SUPER
#endif
#endif
@nitriques
Copy link

Hey, I am just curious about where to call it... On the class level ? Can you give an example please? NS_DESIGNATED_INITIALIZER is great BTW.

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