考虑到此图集中的所有文件名都不同,有没有办法从特定图集中加载所有文件?
我尝试在这篇文章中找到的方法 获取资源文件夹中的文件列表 - iOS 它可以完美运行,但仅适用于基本文件夹而不是 .atlas 扩展名
NSString * resourcePath = [[NSBundle mainBundle] resourcePath];
NSString * documentsPath = [resourcePath stringByAppendingPathComponent:@"MYATLAS.atlas"];
NSError * error;
NSArray * directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsPath error:&error];