原创 iOS多線程編程之NSOperation和NSOperationQueue的使用

(一)隊列裏可以加入很多個NSOperation, 可以把NSOperationQueue看作一個線程池,可往線程池中添加操作(NSOperation)到隊列中。線程池中的線程可看作消費者,從隊列中取走操作,並執行它。 (二)隊列類型  

原创 屏幕旋轉

參考文獻:http://www.cnblogs.com/ihojin/p/uiinterfaceorientation-over-ios6.html

原创 iOS 內存管理(strong weak copy)詳解

(一)strong 強引用:一般使用strong  計數器+1,相當於非arc的 retain (二)weak  弱引用:循環引用時使用(代理、block),相當於非arc的 assign strong型指針就像是栓住的狗。 weak

原创 GCD的定義及使用詳解(同步異步、併發串行、線程間通信、延時執行、只執行一次代碼)

GCD 1、Grand Central Dispatch是由蘋果開發的一個多核編程的解決方案,自動管理現成的生命週期(創建線程、調度任務、銷燬線程)。 2、主要包括任務(執行什麼操作)和隊列(用來存放任務)。 3、同步方式(當前線程)  

原创 iOS 中extern、static修飾變量的使用及define和const區別

(一)extren:外部變量 作用:引用其他類的全局變量 //externViewController.m 全局變量 NSString * const AFNetworkingReachabilityDidChangeNotifica

原创 iOS 單例模式

(一)單例模式:確保某一個類只有一個實例,而且自行實例化並向整個系統提供這個實例。 (二)單例模式的要點:      1、某個類只能有一個實例;      2、必須自行創建這個實例;      3、必須自行向整個系統提供這個實例

原创 UITableViewCell 複用

static NSString *CellTableIdentifier = @"CellTableIdentifier ";UITableViewCell *cell = [tableView dequeueReusableCellWi

原创 UIScrollView常用屬性和代理方法

(一)常用屬性@property(nonatomic)CGPointcontentOffset; //UIScrollView滾動的位置 @property(nonatomic)CGSizecontentSize;//UIScrollV

原创 Masonry使用總結

http://blog.csdn.net/qq_33351410/article/details/52689522

原创 Objective-C編碼規範(待補充)

原文:http://bukkake.iteye.com/blog/695492 蘋果官方:https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Cod

原创 iOS中UITableView使用總結和 iOS UITableView代理方法詳解

iOS中UITableView使用總結 http://my.oschina.net/u/2340880/blog/404605  iOS UITableView代理方法詳解 http://my.oschina.net/u/234088

原创 記錄

1、iOS 9: UIStackView入門 http://www.cocoachina.com/ios/20150623/12233.html 2、iOS開發中第三方庫 http://www.cnblogs.com/dragonbat

原创 iOS block使用總結

(一)blok簡單語法 block  聲明 : int (^myblock)(int a); block 實現 : myblock = ^(int a){ a=1+a; NSLog(@"a=%i"