我想知道我是否可以访问安装我的应用程序的目录。 此外,我想在同一目录中创建一个子目录,以存储我在应用程序中捕获的所有图像。我还想使用 iPhone 的默认图像查看器查看图像。这能做到吗?
最佳答案
NSString *appFolderPath = [[NSBundle mainBundle] resourcePath];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSLog(@"App Directory is: %@", appFolderPath);
NSLog(@"Directory Contents:\n%@", [fileManager directoryContentsAtPath: appFolderPath]);
关于iphone - 如何访问 iPhone 应用程序目录并在那里存储图像文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/516215/