Created
May 11, 2016 09:59
-
-
Save oit63/a463f722fe37272880cfabb133f6b5d0 to your computer and use it in GitHub Desktop.
获取属性协议数组
This file contains hidden or 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
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