CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

NSDictionary-Introspect 0.1.0

NSDictionary-Introspect 0.1.0

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

Installation

CocoaPods is the recommended method of installing NSDictionary-Introspect. Simply add the following line to your Podfile:

Podfile

pod 'NSDictionary-Introspect'

Usage

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];

Requirements

  • Xcode 6
  • iOS 7+ Base SDK

Contact

Chamara Paul

License

NSDictionary-Introspect is available under the MIT license. See the LICENSE file for more info.