I want to give a parameter with an NSTimer.
timertocallguest is an NSTimer made in the .h;
timertocallguest=[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(gettheguestyouaskedforTOTURNON) userInfo:nil repeats:YES];
How can i pass parameters with the selector?
At some selectors i could add withObject behind it to give parameters with it..
but i cant do it here, i just want to give an NSIndexPath with the function that i call.
Could annyone help me with this?
Ty already,
Your call is lacking the colon after the selectors name. It should read like this:
If Xcode suggested the selector without the colon though, make sure the method you’re trying to call actually takes an argument (of type
idorNSIndexPath*).Edit in response to comment:
The object (in this case myObject) needs to be passed in as the userInfo, like so: