Last active
August 29, 2015 14:15
-
-
Save TimothyChilvers/41580b3c7cf123af34b3 to your computer and use it in GitHub Desktop.
Convenience constructor for nibs from classes
This file contains 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
@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