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 6973805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:09:21+00:00 2026-05-27T17:09:21+00:00

I have more then 100 images which I use to load in imageView using

  • 0

I have more then 100 images which I use to load in imageView using following code :

   [imgV setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@%d.png",prefixName,counter]]];

where above code will be called each 0.03s and counter is number for loading different images.

Above idea gives me animation effect, where it use to load different image on 0.03s.

But when the images are more it use to crash.

What should I do ? Or How do I maintain memory in my case? any idea?

  • 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-27T17:09:22+00:00Added an answer on May 27, 2026 at 5:09 pm

    Try to use

    NSString *fileLocation = [[NSBundle mainBundle] pathForResource:fileName ofType:extension];
    NSData *imageData = [NSData dataWithContentsOfFile:fileLocation];
    [UIImage imageWithData:imageData];
    

    instead of

    [imgV setImage:[UIImage imageNamed:fileName.extension]];
    

    Also UIImageView have setAnimationImages method

    imgView=[[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,480)];
    [imgView setAnimationImages:myArray];//myArray - array of Images
    [imgView setAnimationDuration:1];
    [imgView setAnimationRepeatCount=0];
    [imgView startAnimating];
    [self addSubview:imgView];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a code review question more then anything. I have the following problem:
I have more then 100 CSV files which have 10000 row which I am
I have a dbml to which I have added more then 15 tables from
i have read in more then one place that using NHibernate's Identifier as Primary
Can an if statement have more than one then statements? # this works a
i have a div with an id by default, then i append some more
I have more than 3000 members on a site built using wordpress. I am
I am using Isotope and infinitescroll to load images into an image gallery. I
I have 3 tables: tbl_Image from which a list of all images will be
I'm having a problem with the following code. I want to use one UIImageView

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.