如果下面代码返回 nil,可能的原因是,你托图片进 bundle 时候,Xcode 没有把图片真添加进来,可以到下图位置查看是否以存在图片
NSString *path = [[NSBundle mainBundle] pathForResource:@"JADefaultPlaceholderView_NoneData" ofType:@"png"];

如果下面代码返回 nil,可能的原因是,你托图片进 bundle 时候,Xcode 没有把图片真添加进来,可以到下图位置查看是否以存在图片
NSString *path = [[NSBundle mainBundle] pathForResource:@"JADefaultPlaceholderView_NoneData" ofType:@"png"];
本文标题:pathForResource:ofType:方法返回 nil
本文链接:https://www.haomeiwen.com/subject/jnlxyxtx.html
网友评论