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
精彩评论