For example I have a method that looks like this
[self performSelectorOnMainThread:@selector(someMethod)
withObject:data
waitUntilDone:YES];
In which “someMethod” is from another class. If it is possible, how can I do that?
Also, I’d like to know how can I pass in the parameters.
Assume that someMethod is defined as:
- (void)someMethod:(NSData *)data otherArg:(NSString *)arg;
Yes you can call selector of another class as well.
If selector is class method –
and method signature is something like –
If selector is instance method –
and method signature is something like –