12 2012 档案

摘要:static Singleton *sharedSingleton = nil;+(Singleton *)sharedInstance{ if (sharedSingleton == nil) { sharedSingleton = [[super allocWithZone:NULL] init]; } return sharedSingleton;}+(id)allocWithZone:(NSZone *)zone{ return [[self sharedInstance] retain];}-(id)copyWithZone:(NSZone *)... 阅读全文
posted @ 2012-12-26 09:54 白条围巾 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2012-12-20 13:35 白条围巾 阅读(143) 评论(0) 推荐(0) 编辑
摘要:在引用计数方式下,二者没有什么不同,你通常要使用drain在GC(garbage-collected)环境下,drain会在必要时引起GC作用,然而release是个空操作。http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSAutoreleasePool_Class/Reference/Reference.html#//apple_ref/doc/uid/20000051-SW5In a garbage-collected environment, there is 阅读全文
posted @ 2012-12-13 01:12 白条围巾 阅读(1564) 评论(0) 推荐(0) 编辑
摘要://长按事件的手势监听实现方法- (void) myHandleTableviewCellLongPressed:(UILongPressGestureRecognizer *)gestureRecognizer { if (gestureRecognizer.state == UIGestureRecognizerStateBegan) { NSLog(@"UIGestureRecognizerStateBegan"); } if (gestureRecognizer.state == UIGestureRecognizerStateChanged) { ... 阅读全文
posted @ 2012-12-02 16:17 白条围巾 阅读(1978) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示