开发者

Delegate and controller

开发者 https://www.devze.com 2022-12-11 09:21 出处:网络
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, wher

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

精彩评论

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