Like delegates, categories provide an alternative to subclassing, allowing you to add new methods to an existing class. The methods then become part of the class definition and are available to all instances (and subclasses) of that class.

▲

▲
上例给类UIImage增加了一个扩展的方法,这样调用者都可以调用这个方法,相比继承形式更轻量
Singletons
单实例,Cocoa中有很多的这个模式
如
float level = [[UIDevicecurrentDevice] batteryLevel];
…
程序生命期

▲