Re: Number of images in main bundle folder (iPhone)
Re: Number of images in main bundle folder (iPhone)
- Subject: Re: Number of images in main bundle folder (iPhone)
- From: Michael Ash <email@hidden>
- Date: Fri, 26 Jun 2009 17:49:18 -0400
On Fri, Jun 26, 2009 at 1:35 PM, Alexander Spohr<email@hidden> wrote:
> NSArray *d = [[NSBundle mainBundle] pathsForResourcesOfType:@"jpg"
> inDirectory:nil];
> for(NSString *s in d)
> if([s hasPrefix:@"image_"])
> totalCount++;
Note that NSBundle is going to give you full paths, so your check needs to read:
if([[s lastPathComponent] hasPrefix;@"image_"])
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden