• 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: WT <email@hidden>
  • Date: Fri, 26 Jun 2009 16:38:33 +0200

I recommend that you read the 'File and Data Management' section of the 'iPhone Application Programming Guide',

<http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iPhoneAppProgrammingGuide.pdf >

I think it will solve all your file-access problems, since it gives explicit examples on how to accomplish various tasks of that nature.

Wagner

On Jun 26, 2009, at 4:20 PM, Eric E. Dolecki wrote:

I'm having difficulty with the inDirectory argument here, it's on the iPhone
and in my project within Resources I have a folder named PrototypeImages -
how do I specify the inDirectory string?


totalCount = [[[NSBundle mainBundle] pathsForResourcesOfType:@"jpg"
inDirectory:@"PrototypeImages"] count];

NSLog(@"%i", totalCount);


Gives me 0.



On Thu, Jun 25, 2009 at 7:24 PM, Eric E. Dolecki <email@hidden> wrote:

Many thanks.


On Thu, Jun 25, 2009 at 6:55 PM, Steve Christensen <email@hidden>wrote:


You mean that quick perusal of NSBundle.h didn't turn up anything? Maybe
my headers are different from yours, but it was really easy to come up with
that line myself:


NSUInteger jpegCount = [[[NSBundle mainBundle] pathsForResourcesOfType:@"jpg"
inDirectory:subDirName] count];




On Jun 25, 2009, at 2:28 PM, Eric E. Dolecki wrote:

iPhone:
I saw someplace online where a guy got the count for the number of JPGs
in a
folder in the main bundle but I can't find that again.
Can anyone supply the line of code that would return something like that?
I'm googling now too and haven't found it yet.
_______________________________________________

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: Steve Christensen <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: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Re: NSArrayController's add: swaps entire content array when array is accessed via keypath
  • Next by Date: Re: Number of images in main bundle folder (iPhone)
  • Previous by thread: Re: Number of images in main bundle folder (iPhone)
  • Next by thread: Re: Number of images in main bundle folder (iPhone)
  • Index(es):
    • Date
    • Thread