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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:39:10+00:00 2026-05-26T18:39:10+00:00

How can i do animation in iOS with out consuming much memory(or efficiently) as

  • 0

How can i do animation in iOS with out consuming much memory(or efficiently) as i am currently facing crash problems?

For an single animation I am having a sequence of 100 images and each image is about 40kb;like that there are about 7 animations totalling almost 700 images.

For example here i have shown a sample animation with 2 images.This is my current code for doing animation.

/*First taking two images into an Array*/
NSArray *imageArray = [NSArray arrayWithObjects:[UIImage imageNamed:@"img1"],[UIImage imageNamed:@"img2"],nil];  
/*Creating an image view as a layer for performing the animation */
imgView = [UIImageView alloc];
[imgView initWithFrame:CGRectMake(110,245,100,100)];
/*Setting the images for performing animations*/
imgView.animationImages = imageArray;
imgView.animationDuration = 8.5 ;//delay for performing the animation
imgView.animationRepeatCount = 1;
/* ..and finally adding the animation to the current view */
[self.view addSubview:imgView];
[imgView startAnimating];
[imgView release];
[imgView stopAnimating];
imageArray = nil;
[imageArray release];

Can anyone suggest any improvement in the code so that the animations can be efficiently done or is there any other alternative like openGL or Core Animation ,if so can anyone suggest a sample code to do so.

  • 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-26T18:39:11+00:00Added an answer on May 26, 2026 at 6:39 pm

    My suggestion is using Cocos2d, which is a framework based on Open GL specifically designed for games.

    In your case, the advantages you would get are:

    1. using texture atlas instead of individual images to save as much memory as possible;

    2. using the PVR format for your images (vs. PNG); PVR is the native format of the iPhone/iPad graphics chip, and it will allow for more memory saving;

    3. you could also try and use a smaller footprint format for you images (i.e., RGB565 instead of RGB8888, 16 bits per pixel instead of 32).

    If you think this could work for you, have a look at this tutorial.

    You could do the same by using Open GL or Core Animation directly, but I think it is better letting Cocos2d deal with the low-level stuff.

    For a Core Animation based tutorial for doing the same, have a look at this post. As you will see, you will implement a few classes for doing things that Cocos2d already offers you (together with many other features).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am having problems with animation. Can't realize how to animate things in flex?
I can't figure out where core animation on iPhone OS 3.1.2 is defined. Anybody
I'm currently working on some core animation stuff for the iOS and really enjoying
How can I create a continuous animation with an image in iOS? i want
I know that jQuery, for example, can do animation of sorts. I also know
I have created a jQuery animation that can be seen by clicking the Preview
How can I remove the animation from this jQuery modal window? You can see
How can I use displayObjects as animation frames? I have six symbols in my
instead of popup from center can we change to another animation (eg, undo animation)?
what are kinds of animation techniques in android? can u tell me the example

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.