[[NSBundle mainBundle] pathForRe

2017-09-30  本文已影响41人  IMSong

问题:资源已添加到项目中,但NSString *newDataName = [[NSBundle mainBundle] pathForResource:@"" ofType:@""]; 返回为空.

原因:资源没有真正添加到工程

解决方法: Build Phases ->Copy Bundle Resources 点击➕,添加对应的文件资源

上一篇 下一篇

猜你喜欢

热点阅读