开发者

Delegate and controller

What is the difference between the Delegate.h and Delegate.m, and ViewController开发者_Go百科.h and ViewController.m files and their usage


A delegate is incidental to the operation of the object, whereas a controller is required. They are also on different "sides" of the object; the controller controls the view in question; and the object delegates functionality to its delegate, if present, putting the controller above the object and the delegate beside it.

Also, .h files contain declarations; .m files contain code, if that was what you were asking.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜