I'm having a problem writing a class method wich have a method has argument.
The function is inside the class "SystemClass.m/h"
//JSON CALL +(void)callLink:(NSString*)url toFunction:(SEL)method withVars:(NSMutableArray*)arguments { if([self checkConnection]) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSData *datas = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]]; [arguments addObject:datas]; [self performSelectorOnMainThread:@selector(method:) withObject:arguments waitUntilDone:YES]; }); }else{ [self alertThis:@"There is no connection" with:nil]; } } What the function does is to call a JSON url, and give data to a Method
I use it like this:
[SystemClass callLink:@"http://www.mywebsite.com/call.php" toFunction:@selector(fetchedInfo:) withVars:nil]; but it crashes like this:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SystemClass method:]: unrecognized selector sent to class 0x92d50'
May you help me please? I'm trying to found the solution anyway!
Thanks, Alex