I want to send multi-arguments to performSelectorOnMainThread method, but it can send only one parameter. I search for the approach and found amber framework can do this, but I can’t see any api or the document. I don’t know how to use it. Any guys here can help me please?
I want to send multi-arguments to performSelectorOnMainThread method, but it can send only one
Share
The simple solution is to put your data in an
NSDictionaryand pass the dictionary as the sole parameter to the method. You will notice that this is what is often done in Cocoa, see for instance the notification objects.If you feel like it, you can also define a class with custom properties for your purpose, but it is probably not worth it.