I want to pass a point to a C ++ object for a selector called using the performSelectorOnMainThread function. Just hovering over the "id" pointer (objc_object *) does not seem to work. I could always write my own C shell object class, but there should be a pretty standard way to do this. In fact, I did not find anything in the documentation for Apple.
What is the best way to do this?
Here is what I want to do:
...
Foo *foo = new Foo(); // Foo is a C++ class
MyObject *myObj = [[MyObject alloc] init]; // Obj-C class
[myObj performSelectorOnMainThread:@selector(someMethod:) withObject:foo waitUntilDone:NO];
...
Thanks!
source
share