1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| - (NSString *)swpVerificationPropertyType:(id)key value:(id)value { if ([value isKindOfClass:NSClassFromString(@"__NSCFBoolean")]) { return [NSString stringWithFormat:@"@property (nonatomic, assign, getter = is%@) BOOL %@;", [key capitalizedString], key]; } else if ([value isKindOfClass:[NSNumber class]]) { return [NSString stringWithFormat:@"@property (nonatomic, assign) NSInteger %@;", key]; } else if ([value isKindOfClass:[NSString class]]) { return [NSString stringWithFormat:@"@property (nonatomic, copy ) NSString \*%@;", key]; } else if ([value isKindOfClass:[NSDictionary class]]) { return [NSString stringWithFormat:@"@property (nonatomic, copy ) NSDictionary \*%@;", key]; } else if ([value isKindOfClass:[NSArray class]]) { return [NSString stringWithFormat:@"@property (nonatomic, copy ) NSArray *%@;", key]; } else { return @""; } }
|