使用 [NSBundle mainBundle] pathForResource: ofType 无法获取到文件路径的解决办法

【原文地址】http://blog.csdn.net/huyisu/article/details/44224033

正常来说通过 [NSBundle mainBundle] pathForResource: ofType 可以正确获得文件的路径,但是在开发过程中,发现无法正确获得.pages和.docx文件路径,查阅资料发现原因是 并没有真正加入到bundle中,需要在项目设置中,build phases->copy bundle resources 下面添加文件即可

posted @ 2017-03-13 14:28  YouNeedCourage  阅读(1856)  评论(0编辑  收藏  举报