开发者

pathForResorce doesn't work with NSMutableArray

I have a jpg picture in my "Other Sources" folder, on xcode. Nice. But I'm trying to add this image to my NSMutableArray.

[self.gallery addObject:[[NSBundle mainBundle] path开发者_如何学编程ForResource:@"001" ofType:@"jpg"]];

NSLog(@"%i", [self.gallery count]);

When I counts it, it returns 0.

What's happening?


either self.gallery is nil or there is no image 001.jpg in your bundle

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜