AutoDescribe
AutoDescribe copied to clipboard
A category on NSObject which allows you to query information about an instance.
AutoDescribe
AutoDescribe is a category on NSObject which allows you to query information about an instance.
This category extends NSObject with methods for acquisition of lists of properties and methods.
It also enables objects to print their properties and values without the need of writing never-ending NSLog statements.
License
Source code of this project is available under the standard MIT license. Please see the license file.
Installation
The source files have been moved to MKFoundationKit pod.
-
Add to your Podfile:
pod 'MKFoundationKit/AutoDescribe' -
Import public header:
#import <MKFoundationKit/NSObject+MK_AutoDescribe.h>
API
+ (NSArray *)mk_propertyList;
+ (NSArray *)mk_propertyList:(Class)clazz;
+ (NSArray *)mk_methodListOnly;
+ (NSArray *)mk_methodListOnly:(Class)clazz;
+ (NSArray *)mk_methodList;
+ (NSArray *)mk_methodList:(Class)clazz;
- (void)mk_printObject;
- (void)mk_printObjectKeys:(NSArray *)keys;
- (void)mk_printObjectMethods;
- (void)mk_printObjectMethodsOnly;
- (NSString *)mk_className;
Contributing
- Fork it.
- Create your feature branch (
git checkout -b new-feature). - Commit your changes (
git commit -am 'Added new-feature'). - Push to the branch (
git push origin new-feature). - Create new Pull Request.