I’m trying to call a method inside my viewDidLoad method. How can I do that? I did a fast search and I found @selector. I have never used it before, can any one give me a fast example.
I’m trying to call a method inside my viewDidLoad method. How can I do
Share
You don’t necessarily need selector to call a method, you can invoke it directly, e.g. to call someMethod method that takes no parameters on someObject you can do the following:
or to call someMethod on current object you can use self:
If you really need to call a method via selector use performSelector: method (or another of few methods of ‘performSelector’ family) of NSObject: