• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Number of images in main bundle folder (iPhone)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Number of images in main bundle folder (iPhone) (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: Alexander Spohr <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: Bill Bumgarner <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: Bill Bumgarner <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: glenn andreas <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Number of images in main bundle folder (iPhone) (From: Alexander Spohr <email@hidden>)

  • Prev by Date: Re: GC pros and cons
  • Next by Date: Re: GC pros and cons
  • Previous by thread: Re: Number of images in main bundle folder (iPhone)
  • Next by thread: Tool-tips on NSTabViewItem
  • Index(es):
    • Date
    • Thread