2010年9月14日 星期二

[iPhone] How To Save Your App Data With NSCoding and NSFileManager | Ray Wenderlich

How To Save Your App Data With NSCoding and NSFileManager | Ray Wenderlich

1. 用NSCoding和NSFileManager存取資料。

2. 取得App下的Library的目錄:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];    
documentsDirectory = [documentsDirectory stringByAppendingPathComponent:@"Private Documents"];

沒有留言: