[NSBundle mainBundle] pathForResource: ofType: 获取不到数据
2015-03-12 16:57
519 查看
从bundle中获取数据,明明把数据添加到项目中了,但就是不对。
NSString *newDataName = [[NSBundle
mainBundle] pathForResource:dataName
ofType:format]; 为空
后来从网上查到相关信息,当时添加是直接拖拽过去,没有真正加入到bundle中,需要在项目设置中,build phases-》copy bundle resources 下面添加自己的数据就可以了。
记录一下。
NSString *newDataName = [[NSBundle
mainBundle] pathForResource:dataName
ofType:format]; 为空
后来从网上查到相关信息,当时添加是直接拖拽过去,没有真正加入到bundle中,需要在项目设置中,build phases-》copy bundle resources 下面添加自己的数据就可以了。
记录一下。
相关文章推荐
- [NSBundle mainBundle] pathForResource: ofType: 获取不到数据
- iOS问题笔记-[[NSBundle mainBundle] pathForResource: ofType:]方法获取不到资源路径
- [[NSBundle mainBundle]pathForResource:@"name" ofType:@"type"] 获取不到本地文件
- iOS [[NSBundle mainBundle] pathForResource:@"" ofType:@""]无法获取到文件
- [[NSBundle mainBundle]pathForResource:@"XXX" ofType:@"db"]为nil的解决办法
- 关于[[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"]找不到指定文件的解决办法
- [[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"] 找不到对应的文件解决方法
- 关于[[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"]找不到指定文件的解决办法
- 关于[[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"]找不到指定文件的解决办法
- 关于[[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"]找不到指定文件的解决办法
- 关于[[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"]找不到指定文件的解决办法
- iOS开发中 [[NSBundle mainBundle] pathForResource: ofType:]路径为空的问题
- NSBundle mainBundle] pathForResource 返回nil的解决办法
- 关于[[NSBundle mainBundle] pathForResource:@"name"
- iOS开发.[NSBundle mainBundle] 通过pathForResource返回路径为空.
- iOS开发 [NSBundle mainBundle] 通过pathForResource返回路径为空.
- [[NSBundle mainBundle]pathForResource..取值为空
- [[NSBundle mainBundle]pathForResource..取值为空
- NSBundle的pathForResource:ofType: 返回值为nil问题
- NSBundle pathForResource取不到值问题