invoking a delegate method of a class by code
is it possible to invoke a delegate method of a class by code?
In my case I want to invoke the searchBar:textDidChange:
m开发者_如何学Pythonethod in my code!
If yes how would I do that ?
Yes, if you know exactly how to cook the objects for its parameters.
It is just another method and you can call like
[self searchBar:parameter textDidChange:parameter];
IMHO, I would say, in this case, searchBar is in better position to pass the objects, rather than you invoke yourself.
精彩评论