What is the role of performSelector?
Comparing:
[self btnClicked];
and
[self performSelector:@selector(btn
PerformSelector basically allows you to decide what message to pass during runtime (late binding), as opposed to languages like plain C. If you know the name to a method in an objective C class, you can use
NSSelectorFromString()
To convert a string into a selector, and have your class call that selector using performSelector. In this way, you can choose different functions to call during runtime. You can even select which function to call using a config file.