问题
How to pass a C++ object with the performSelector method? This method only allows you to pass 'objc_object*' objects, I can't cast them. I could build a wrapper, but I don't know the overall superclass for all C++ objects, so I don't know how I could build a generic wrapper (I don't want specific knowledge about the object in the wrapper)..
Any hints?
回答1:
Try just using +[NSValue valueWithPointer:].
来源:https://stackoverflow.com/questions/1928152/passing-a-c-object-with-an-objective-c-cocoa-event-performselector