今天正式開始了整個項目,學到了不少,做一些總結:
- JSON
Objective-C從iOS5開始,天生就支持JSON,不需要引入任何第三方的庫,就能完成。示例代碼如下:
NSError* error = nil; id result = [NSJSONSerialization JSONObjectWithData:str options:NSJSONReadingMutableLeaves error:&error]; if(error) return; id status = result[@"status"]; int s = [(NSNumber*)status intValue]; if(s != 0) return;
- Xcode如何支持SVN
我們熟悉的Version Control在Xcode中叫做SCM(Software Configuration Management,學習CMMI的時候整天看到,原來就是Version Control
1. 在Xode的菜單中選擇 SCM -> Configure Repositories,填寫SVN服務器的信息
2. 然後選SCM -> Repositories 你就可以Import, Check Out你想要的內容了,SVN的日常管理也可以在這裏做。
3. Checkout項目以後在你的項目的屬性中設置項目的SCM
4. 設置好以後,你在你的項目視圖中就可以看到新的一列,M表示該文件已經修改過,然後你已經可以通過SCM菜單,或者右鍵菜單直接進行SVN的操作, commit,update,revert,diff and log,任何你想要的。
- Xcode如何支持XML
包含${SDK_DIR}/usr/include/libxml2,引入libxml2.dylib
- -fno-objc-arc