NSMutableArray *images = [NSMutableArray arrayWithObjects:[UIImage imageNamed:@"JGirl 01.jpg"],
[UIImage imageNamed:@"JGirl 03.jpg"], ... ,
[UIImage imageNamed:@"JGirl 48.jpg"],
nil];
self.view = [[[SlideShowView alloc] initWithImages:images byIndex:index] autorelease];
assume that my images contain 48 object but when i debug images have only 23 objects.
Why aren't all my images loading?
Sounds like a problem with nil-termination. If one of your image objects (the 24th, probably) is coming back nil because of a typo in the name or a corrupt/non-existent image file, it will act like the final "nil" that terminates the list and your array will ignore everything after that. It's a common pitfall with arrayWithObjects: and dictionaryWithObjectsAndKeys:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With