Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5974921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:00:37+00:00 2026-05-22T21:00:37+00:00

OK, I am sure that there is a simple way to do this but

  • 0

OK, I am sure that there is a simple way to do this but I just can’t find the answer anywhere.

I have a whole stack of images that I need to load for several different UIImageView animations. I want these to load using a loop because there are so many but I can’t work out how to isolate the correct images in the bundle.

So for example, say I have 40 image files. The first 13 are named jack_1.png up to jack_13.png the next 16 are called jill_1.png up to jill_16.png and 11 called hill_1.png up to hill_11.png.

I would like to create an for/if statement that loads all @"jack_%i.png" files into on array, all @"jill_%i.png" files into another Array and so on.

I hope this make sense.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:00:37+00:00Added an answer on May 22, 2026 at 9:00 pm

    This is the code for the jack Array, the code for the others would be the same but changing the relevant pieces (the limit in the loop and the format for the name)

    for (int i = 1; i <= 13; i++) {
        [jackArray addObject:[UIImage imageNamed:[NSString stringWithFormat:@"jack_%d.png", i]]];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a feeling that this question is very simple, but I just can't
I am not sure where i've seen this before, but im sure that there
I'm pretty sure there is an easier way to do this that I'm missing
Sorry for this simple question but I seem not to find any other way
I'm sure there's a simple solution to this but it's got me stuck so
I'm probably missing something simple here, but I can't find the answer elsewhere. I
I do know that there is no sure fire way to fully protect an
is there any way of making sure that, one user is logged in only
Is there any way to make sure that a table and cells it contains
I know that there are listeners in JavaFX, and i'm sure Java. But I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.