CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Apr 2015 |
Maintained by Chamara Paul.
Objective-C Runtime Property Introspection
To print out the properties and values of a class on demand in the form of a NSDictionary. For more information, read: https://medium.com/@keepsaltmine/objective-c-runtime-property-introspection-c96f7884acea
CocoaPods is the recommended method of installing NSDictionary-Introspect
. Simply add the following line to your Podfile
:
pod 'NSDictionary-Introspect'
To use this code, override the description method of your NSObject like so:
- (NSString *)description {
NSDictionary *dictionary = [NSDictionary dictionaryWithPropertiesOfObject:self];
return [NSString stringWithFormat:@"%@", dictionary];
}
And then, simply call:
[YourNSObjectInstance description];
Chamara Paul
NSDictionary-Introspect
is available under the MIT license. See the LICENSE file for more info.