Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的“组和文件”中,我创建了类似的东西:
图片 > gui 图片 > foo 图片 > foo > bar
现在我想遍历放置在 images > foo > bar 中的所有图像。那可能吗?恐怕不是,因为系统在加载文件时从不关心“文件夹”。
如果您的图像位于 .app 包的子文件夹中,您可以为该文件夹创建一个 nsbundle 并调用 pathsForResourcesOfType 以获取路径的 nsareay。