TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Khoa Pham.
Allows your category methods to be in shorthand form, like MagicalCord MR_SHORTHAND
Learn code from Magical Record short hand, and make it easier to use
For example, I have a category on NSString
NSString+FTGAdditions.h
@interface NSString (FTGAdditions)
- (void)ftg_doSomething1;
- (void)ftg_doSomething2;
@end
NSString+FTGShorthandAdditions.h
Declare your shorthand methods here to make the compiler happy
@interface NSString (FTGShorthandAdditions)
- (void)doSomething1;
- (void)doSomething2;
@end
NSString+FTGAdditions.h
Configure FTGShorthand in load
method
@implementation NSString (FTGAdditions)
- (void)ftg_doSomething1
{
NSLog(@"doSomething1 on %@", self);
}
- (void)ftg_doSomething2
{
NSLog(@"doSomething2 on %@", self);
}
#pragma mark - FTGShorthand
+ (void)load
{
[FTGShorthand setPrefix:@"ftg_"];
[FTGShorthand supportShorthandMethodsForClass:self];
}
@end
supportShorthandMethodsForClass
in each of your categoryFTGShorthand is released under the MIT license. See LICENSE