开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜