【发布时间】:2015-06-26 21:44:19
【问题描述】:
我有一个这样的捆绑结构:
bundle's root
------atlases
------------en.lproj
--------------------test-hd.plist
------------es.lproj
--------------------test-hd.plist
但是当我尝试使用此代码获取 test-hd.plist 以进行当前本地化时
[[NSBundle mainBundle] pathForResource:@"test-hd.plist" ofType:nil inDirectory:@"atlases"]
它总是返回 nil。我的错误在哪里?我该如何解决?
附言“atlases”文件夹被添加为文件夹引用,并且 test-hd.plist 始终可以通过直接路径[[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"atlases/en.lproj/test-hd.plist"]
【问题讨论】:
标签: ios objective-c cocoa cocoa-touch