• 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: "Eric E. Dolecki" <email@hidden>
  • Date: Fri, 26 Jun 2009 13:17:43 -0400

This is what I ended up doing:

totalCount = 0;

NSArray *d = [[NSBundle mainBundle] pathsForResourcesOfType:@
"jpg" inDirectory:@"/"];

 *// Loop through and find the JPGs that have "image_" in them*

for( int i=0;i<[d count];i++){

NSString *searchForMe = @"image_";

NSString *s = [[NSString alloc] initWithString:[d objectAtIndex:i]];

NSRange range = [s rangeOfString:searchForMe];

if( range.location != NSNotFound ){

totalCount++;

}

}

So this is kind of doing what I wanted - a decent concession I guess.

Eric



On Fri, Jun 26, 2009 at 11:44 AM, glenn andreas <email@hidden> wrote:

>
> On Jun 26, 2009, at 10:33 AM, Eric E. Dolecki wrote:
>
>  I would like to have a folder in the app act as the determining factor, I
>> looked at my target and it's flattened out. perhaps I need to use some
>> kind
>> of file naming convention instead?
>>
>>
> Or just use one of the several capabilities of Xcode to organize the
> results:
> - You can copy the files via a separate "Copy Files" build phase, where you
> can specify that they be placed in a specific subfolder of  the resources
> folder
> - You can treat the source folder from whence the files came as a single
> unit, with its contents copied en-masse, by adding the folder as a reference
> instead of a group.
> - You can manually copy the files where ever you want in a shell script
> build phase
>
>
> Glenn Andreas                      email@hidden
>  <http://www.gandreas.com/> wicked fun!
> Mad, Bad, and Dangerous to Know
>
>


--
http://ericd.net
Interactive design and development
_______________________________________________

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

  • Follow-Ups:
    • Re: Number of images in main bundle folder (iPhone)
      • From: Alexander Spohr <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: "Eric E. Dolecki" <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>)
 >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>)

  • Prev by Date: Re: Hiding a running application
  • 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