Skip to content

Instantly share code, notes, and snippets.

@oit63
Created May 11, 2016 09:59
Show Gist options
  • Save oit63/a463f722fe37272880cfabb133f6b5d0 to your computer and use it in GitHub Desktop.
Save oit63/a463f722fe37272880cfabb133f6b5d0 to your computer and use it in GitHub Desktop.
获取属性协议数组
NSString *propertyAttributes = [NSString stringWithUTF8String:property_getAttributes(property)];
NSArray *propertyAttributesStringArray = [propertyAttributes componentsSeparatedByString:@","];
NSString *propertyClassInformationString = classTypeStringArray[0];
NSString *propertyClassTypeString = [propertyClassInformationString componentsSeparatedByString:@"\""][1];
NSString *propertyClassProtocolsString = [propertyClassInformationString componentsSeparatedByString:@"\""][2];
propertyClassProtocolsString = [classTypeString stringByReplacingOccurrencesOfString:@">" withString:@""];
propertyClassProtocolsString = [classTypeString stringByReplacingOccurrencesOfString:@"<" withString:@""];
NSArray *propertyClassProtocolsArray = [propertyClassProtocolsString componentsSeparatedByString:@","];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment