如何在iOS中获取目录的路径应用程序
答
这将让你的路径到你的应用程序文件结构中的几个不同的地方。
NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *sourcePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Populator"];
NSString *folderPath = [documentsDirectory stringByAppendingPathComponent:@"Files"];
NSLog(@"Source Path: %@\n Documents Path: %@ \n Folder Path: %@", sourcePath, documentsDirectory, folderPath);
只要你明白,在这个网站上,你应该自己做一些工作,看看你的问题可能已经得到解答。快速搜索“iOS资源文件夹”打开此链接:http://*.com/q/8430685/96716 – 2012-07-20 13:20:33