You have several ways to find argument type names for a selector. For example, this code will work:
Method method = class_getInstanceMethod([self class], @selector(someMethod:param2:param3:));
char type[256];
int argsNumber = method_getNumberOfArguments(method);
for (int i = 0; i < argsNumber; i++) {
method_getArgumentType(method, i, type, 256);
NSLog(@"%s", type);
}
The first and second arguments to the log are the system, and you are not interested in them, so you need other lines.
also the code below will give you the same result
NSMethodSignature *sig = [self methodSignatureForSelector:@selector(someMethod:param2:param3:)];
int args = [sig numberOfArguments];
for (int i = 0; i < args; i++) {
NSLog(@"%s", [sig getArgumentTypeAtIndex:i]);
}
someMethod:param2:param3: may have such an implementation, for example,
- (BOOL) someMethod:(NSString *)str param2:(UIView *)view param3:(NSInteger)number
{
return NO;
}
! , )) , const char * . , . int char, UIView NSString. id '@', id. , . , . , PLS.
, . , .