Latest 0.0.5
Homepage https://github.com/mysterioustrousers/MYSRuntime
License MIT
Platforms ios 5.0, osx 10.6, requires ARC
Frameworks Foundation
Authors

Obj-C Library that makes runtime self-inspection and class modification dead easy.

Using objective-c objects to wrap classes methods and properties, it is much easier and
straight-forward to get information about a classes properties.

Creating methods from blocks and adding them to classes is also dead easy.

Example

Easily get information about properties:

NSArray *properties = [self.klass properties];
for (MYSProperty *property in properties) {
    property.type           // e.g. MYSTypeLongLong
    property.name           // e.g. propertyName
    property.isReadOnly;  
    property.storageType;   // e.g. MYSPropertyStorageTypeStrong
    property.isNonAtomic;
    property.getter;        // the name of the getter method.
    property.setter;        // the name of the setter method.
    property.isDynamic;
    property.isElegibleForGarbageCollection; 
    property.propertyAttributesString; // the original attributes string.
}

Easily create methods from blocks and add them as methods to classes.

MYSMethod *testMethod = [[MYSMethod alloc] initWithName:@"setName:age:"
                                    implementationBlock:^(id self, NSString *name, NSNumber *age)
{
    [self setObjectTest:name];
    [self setLongTest:[age longValue]];
}];

MYSClass *testClass   = [[MYSClass alloc] initWithClass:[MYSTestClass class]];
[testClass addMethod:testMethod];

Author

Adam Kirk @atomkirk

Credits

Uses CTBlockDescription.

Latest podspec

{
    "name": "MYSRuntime",
    "version": "0.0.5",
    "summary": "Obj-C Library that makes runtime self-inspection and class modification dead easy.",
    "description": "                   Using objective-c objects to wrap classes methods and properties, it is much easier andn                   straight-forward to get information about a classes properties.nn                   Creating methods from blocks and adding them to classes is also dead easy.n",
    "homepage": "https://github.com/mysterioustrousers/MYSRuntime",
    "license": "MIT",
    "authors": {
        "Adam Kirk": "[email protected]"
    },
    "platforms": {
        "ios": "5.0",
        "osx": "10.6"
    },
    "source": {
        "git": "https://github.com/mysterioustrousers/MYSRuntime.git",
        "tag": "0.0.5"
    },
    "source_files": "MYSRuntime/*.{h,m}",
    "frameworks": "Foundation",
    "requires_arc": true
}

Pin It on Pinterest

Share This