I want to pass an int value from my selector method, but the selector method takes only an object type parameter.
int y =0;
[self performselector:@selector(tabledata:) withObject:y afterDelay:0.1];
Method execution is here
-(int)tabledata:(int)cellnumber {
NSLog(@"cellnumber: %@",cellnumber);
idLabel.text = [NSString stringWithFormat:@"Order Id: %@",[[records objectAtIndex:cellnumber] objectAtIndex:0]];
}
but I am not getting exact integer value in my method, I am only getting the id value.
The easiest solution, if you ‘own’ the target selector, is to wrap the int argument in an NSNumber:
To call this method you would use: