问题
What is the difference between calling the methods with following types
1.
[self methodName];
and
2.
[self performSelector:@selector(methodName)]; // no afterDelay is used
Is it like performSelector will use different thread to work??
回答1:
In most cases, they are equivalent.
According to the documentation, the purpose of the performSelector:
variant is so that you can call methods that are defined dynamically and not actually present at compile-time. That's all. For calling a method that is present at compile-time, there is no difference between the two.
来源:https://stackoverflow.com/questions/7445337/difference-between-self-methodname-and-self-performselectorselectormethod