Latest 0.1.0
Homepage https://github.com/saltmine/NSDictionary-Introspect
License MIT
Platforms ios 7.0, requires ARC
Authors

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.

Latest podspec

{
    "name": "NSDictionary-Introspect",
    "version": "0.1.0",
    "summary": "Objective-C Runtime Property Introspection",
    "homepage": "https://github.com/saltmine/NSDictionary-Introspect",
    "license": "MIT",
    "authors": {
        "Chamara Paul": "[email protected]"
    },
    "source": {
        "git": "https://github.com/saltmine/NSDictionary-Introspect.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/chamwow",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "*.{h,m}"
}

Pin It on Pinterest

Share This