I need to invoke:
[self performSelectorOnMainThread:@selector(chooseURL:) withObject:myIndex waitUntilDone:YES];
But my problem is that myIndex is an int, and NOT an object. Is there a workaround for that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to wrap the int in an object since int is a primitive type and not an object. For example:
Of course you will have to edit your chooseURL: method to accept a NSNumber instead of an int.
To unwrap: