Dit is nog eens vet!
Why you might wonder? World domination of course! Here goes! #import <Foundation/Foundation.h> #import <objc/runtime.h> @interface MyInterface : NSObject { NSString *string; } @property (nonatomic, retain) NSString *string; @end @implementation MyInterface @synthesize string; @end // The method we want to add to class `MyInterface` void printSelfIMP(id self, SEL _cmd, …) { NSLog(@"I'm off class %@ and it holds the following string: … Read More
via Spiced Cocoa
Vind ik leuk:
Wees de eerste om post te waarderen.
Nog geen reacties op “Adding methods to Objective-c classes during runtime (via Spiced Cocoa)”