If I use
[self performSelectorOnMainThread:@selector(uploadDidEnd:) withObject:foo
waitUntilDone:YES]
In the method -(void)uploadDidEnd:(id)sender
Which object is sender? in the call foo is a custom class? How can I convert this sender in my object?
I’m trying to cast but I’m having
'-[_NSThreadPerformInfo CountY]: unrecognized selector sent to instance 0x52bbd0'
In notifications, I use a cast from sender to NSNotification and notification have the object property, but for NSThread I didn’t found.
Thanks.
You can think of:
as sort of the same as:
Are you sure that’s what you’re trying to do?
If so: inside your
uploadDidEnd:implementation, you can cast foo to whatever object type it really is like so: