Int or NSInteger as object for method argument. Objective-C
- by sergiobuj
Hi. I'm having some trouble passing a number as an argument for a method:
-(void) meth2:(int)next_int;
And to call that method i need this:
int next_int = 1;
[self performSelectorOnMainThread:@selector(meth2:) withObject:next_int waitUntilDone:NO];
//update next_int and call meth2 again
at this point i get a "pointer from integer without a cast" error, and would happen the same with a NSInteger. A NSNumber is not useful because it's immutable and i need to change the value constantly.
Any Idea how can i do this?
Thanks.