[SomeClass performSelectorOnMainThread:staticMethod withObject:nil waitUntilDone:NO]
Yes, performSelectorOnMainThread:withObject:waitUntilDone:
not a class method.
Yes, this is an instance method on NSObject
.
Yes, all class objects are instances of NSObject
. ( I'm not joking! )
You can also do:
dispatch_async(dispatch_get_main_queue(), ^{ [SomeClass doClassyThingWithObject:object1 andDiddleyDoo:foo]; });
source share