2013年2月18日

Template Method

摘要: Cocoa Design Pattern pdfchapter 4In many cases, an algorithm or process consists of several steps that are needed by many applicaions and one or more steps that may be unique to each applicaiton. The Template Method pattern implements the common steps within a reusable class while still enabling app 阅读全文

posted @ 2013-02-18 23:00 Chansonyan 阅读(150) 评论(0) 推荐(0)

Convenience methods

摘要: Many Cocoa classed provide methods that combine the two stages of allocating and initializing to return temporary instances. Such methods are called convenience methods.Convenience methods include the name of the class in the method's name. For example, the NSString class provides the +(id)strin 阅读全文

posted @ 2013-02-18 16:01 Chansonyan 阅读(196) 评论(0) 推荐(0)

导航