基礎(chǔ)
這些技巧你要總是想著實現(xiàn)在你開發(fā)的App中
1、用ARC去管理內(nèi)存(Use ARC to Manage Memory)
2、適當(dāng)?shù)牡胤绞褂胷euseIdentifier(Use a reuseIdentifier Where Appropriate)
3、盡可能設(shè)置視圖為不透明(Set View as Opaque When Possible)
4、避免臃腫的XIBs文件(Avoid Fat XiBs)
5、不要阻塞主進程(Don’t Block the Main Thread)
6、調(diào)整圖像視圖中的圖像尺寸(Size Images to Image Views)
7、選擇正確集合(Choose the Correct Collection)
8、啟用Gzip壓縮(Enable GZIP Compression)
中級
這些技巧是當(dāng)你遇到更復(fù)雜的情況的時候使用
1、重用和延遲加載視圖(Reuse and Lazy Load Views)
2、緩存,緩存,緩存(Cache,Cache,Cache)
3、考慮繪圖(Consider Drawing)
4、處理內(nèi)存警告(Handle Memory Warnings)
5、重用大開銷對象(Reuse Expensive Objects)
6、使用精靈表(Use Sprite Sheets )
7、避免重復(fù)處理數(shù)據(jù)(Avoid Re-Processing Data)
8、選擇正確的數(shù)據(jù)格式(Choose the Right Data Format)
9、適當(dāng)?shù)脑O(shè)置背景圖片(Set Background Images Appropriately)
10、減少你的網(wǎng)絡(luò)占用(Reduce Your Web Footprint)
11、設(shè)置陰影路徑(Set the Shadow Path )
12、你的表格視圖Optimize Your Table Views)
13、選擇正確的數(shù)據(jù)存儲方式(Choose Correct Data Storage Option)
高級
這些技巧你應(yīng)該只在你很積極認為它們能解決這個問題,而且你覺得用它們很舒適的時候使用
1、加速啟動時間(Speed up Launch Time )
2、使用自動釋放池(Use AutoRelease Pool)
3、緩存圖像(Cache Images-Or not )
4、盡可能避免日期格式化器(Avoid Date Formatters Where Possible)