Fork me on GitHub

2012年5月11日

摘要: 原文:http://www.duckrowing.com/2010/05/21/using-the-singleton-pattern-in-objective-c/感谢作者what the purpose of the +allocWithZone override is?+allocWithZone is overridden to make sure you can only allocate a single instance of this object. All subsequent calls should return nil.I don't think you' 阅读全文
posted @ 2012-05-11 16:03 pengyingh 阅读(564) 评论(0) 推荐(0)
摘要: http://gaoyong.diandian.com/post/2011-11-02/6443926我们今天谈谈cocoa程序设计中的模型-视图-控制器(MVC)范型。我们将从两大方面来讨论MVC:什么是MVC?M、V、C之间的交流方式是什么样子的?理解了MVC的概念,对cocoa程序开发是至关重要的。一、MVC的概念MVC是Model-VIew-Controller,就是模型-视图-控制器,这些都是什么东西呢?MVC把软件系统分为三个部分:Model,View,Controller。在cocoa中,你的程序中的每一个object(对象)都将明显地仅属于这三部分中的一个,而完全不属于另外两个 阅读全文
posted @ 2012-05-11 09:03 pengyingh 阅读(14097) 评论(4) 推荐(1)

导航