I have a class where I need to create an Object from using reflection.
say I have the following class (got by class-dump or else):
@interface SomeClass : NSObject
{
- (void)dealloc;
- (id)initWithArguments:(char *)value1 arg2:(int)value2;
}
Now I want to create a new object from it using reflection:
Class theClass = [instance class];
SEL selector = NSSelectorFromString(@"initWithArguments:arg2:");
id newInstanceOfClass = [[theClass alloc] performSelector:selector withObject:????];
How can I pass the secondary parameter?
Note that I am not able to change the layout of SomeClass
.