资源已添加到项目中了,但NSString *newDataName = [[NSBundle mainBundle] pathForResource:@"" ofType:@""]; 返回为空
后来从网上查到相关信息,当时添加是直接拖拽过去,没有真正加入到bundle中,需要在项目设置中,build phases-》copy bundle resources 下面添加自己的数据就可以了。
记录一下。
资源已添加到项目中了,但NSString *newDataName = [[NSBundle mainBundle] pathForResource:@"" ofType:@""]; 返回为空
后来从网上查到相关信息,当时添加是直接拖拽过去,没有真正加入到bundle中,需要在项目设置中,build phases-》copy bundle resources 下面添加自己的数据就可以了。
记录一下。
本文标题:OC(廿三):[[NSBundle mainBundle] pa
本文链接:https://www.haomeiwen.com/subject/salgextx.html
网友评论