摘要: View Code @interface Singleton : NSObject {}+ (Singleton *) sharedInstance;- (void) operation;@endView Code #import "Singleton.h"@implementation Singletonstatic Singleton *sharedSingleton_ = nil;- (void) operation{ // do something NSLog(@"Singleton");}+ (Singleton *) sharedInstan 阅读全文
posted @ 2011-10-21 10:43 Gang.Wang 阅读(379) 评论(0) 推荐(0) 编辑
摘要: View Code @interface BrandingFactory : NSObject {}+ (BrandingFactory *) factory;- (UIView *) brandedView;- (UIButton *) brandedMainButton;- (UIToolbar *) brandedToolbar;@endView Code #define USE_ACME@implementation BrandingFactory+ (BrandingFactory *) factory{#if defined (USE_ACME) return [[[Acme... 阅读全文
posted @ 2011-10-21 10:30 Gang.Wang 阅读(407) 评论(0) 推荐(0) 编辑