TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Khoa Pham.
Synthesize properties for categories
@property (nonatomic, assign) BOOL categoryBoolProperty;
This property is not supported because it is of type BOOL
@interface FTGClassA : NSObject
@property (nonatomic, strong) NSNumber *strongProperty;
@end
This property is not supported because it is not in category, it will be auto synthesized to have getter, setter and backing instance variable.
@property (nonatomic, copy, setter = updateCategoryCopyProperty:) NSString *categoryCopyProperty;
@property (nonatomic, strong) NSNumber *categoryStrongProperty;
This will select OBJC_ASSOCIATION_RETAIN_NONATOMIC
@dynamic
to suppress warningNSArray *kClassAProperties = [FTGPropertyMaestro propertiesForClass:[FTGClassA class]];
FTGProperty *wheelNumberProperty = [FTGPropertyMaestro propertyForClass:[FTGCar class]
propertyName:@"wheelNumber"];
```
Synthesize property for category
--
`FTGClassA+FTGAdditions.h`
@interface FTGClassA (FTGAdditions)
@property (nonatomic, assign, getter = fetchCategoryBoolProperty) BOOL categoryBoolProperty; @property (nonatomic, strong) NSNumber *categoryStrongProperty; @property (nonatomic, copy, setter = updateCategoryCopyProperty:) NSString *categoryCopyProperty;
@end
`FTGClassA+FTGAdditions.m`
@implementation FTGClassA (FTGAdditions)
@dynamic categoryBoolProperty; @dynamic categoryCopyProperty; @dynamic categoryStrongProperty;
@end
Testing
--
Use XCTest
License
--
This project is released under the MIT license. See LICENSE.md