Skip to content

Instantly share code, notes, and snippets.

@TimothyChilvers
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TimothyChilvers/41580b3c7cf123af34b3 to your computer and use it in GitHub Desktop.
Save TimothyChilvers/41580b3c7cf123af34b3 to your computer and use it in GitHub Desktop.
Convenience constructor for nibs from classes
@interface UINib (ClassLoading)
+ (UINib *)nibWithClass:(Class)classToLoad;
@end
@implementation UINib (ClassLoading)
+ (UINib *)nibWithClass:(Class)classToLoad {
return [UINib nibWithNibName:NSStringFromClass(classToLoad) bundle:nil];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment