How can I call a CLASS METHOD
on the main thread?
Something like:
[SomeClass performSelectorOnMainThread:staticMethod withObject:nil];
Please don't tell me to create a regular method to call this class method. That would be an obvious solution, but not clean.
Thanks
Yes,
performSelectorOnMainThread:withObject:waitUntilDone:
is not a class method.Yes, it is an instance method on
NSObject
.Yes, all Class objects are instances of
NSObject
. (I'm not kidding!)You could also do:
How about: