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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:56:12+00:00 2026-05-19T00:56:12+00:00

When programming for the iPhone, when is it best to use CoreAnimation over another

  • 0

When programming for the iPhone, when is it best to use CoreAnimation over another API (and vice-versa)? OpenGL has a more generic range of features (being as low-level as it is). CoreAnimation is a lot easier to get set up, and it has features like caching.

I’m making a game (2D), and it involves a lot of physics. I really want this game to run at a minimum of 50 FPS, preferably 60 (or whatever is necessary to keep up with vsync). I don’t know how to utilize animations in this case, but I can split everything up into sprites/CALayers. I’ll be setting their position and rotation every frame (maybe just the visible ones). Many of the sprites are identical. Some of these sprites will be changing colors every frame. I won’t be using many images, but I will be using a lot of gradients.

So, will CoreAnimation be an optimization or a bottleneck? When is it best to use CoreAnimation, and when is it best to use other APIs?

  • 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-19T00:56:12+00:00Added an answer on May 19, 2026 at 12:56 am

    Core Animation lets you do a lot with a minimal amount of code. It makes managing 2-D layers and their animation relatively easy. Because animations are handled for you, even those involving complex paths or timing curves, you don’t need to write code to update the display every frame or calculate the tweening of an animation. Core Animation also integrates nicely with the 2-D drawing capabilities you have in Quartz, with native Cocoa Touch interface elements and touch handling, and with your Objective-C code elsewhere in your application.

    If you use the framework as intended, you can achieve very good performance. In my benchmarks on my old first-generation iPhone, I was able to animate 50 translucent layers at once onscreen at about 60 FPS. However, this is with predefined linear paths being specified for each layer ahead of time and no interruption of the animations.

    OpenGL ES is for when you just don’t think you’ll be able to get the necessary performance without talking directly to the underlying hardware, or for when you need to do true 3-D work (Core Animation can do limited 3-D effects, but only with rectangular planes). The tradeoff for having better performance and more flexibility is the need to write a lot more code that is a lot harder to read. Also, it can be a nightmare to debug OpenGL ES sometimes.

    One other potential advantage of OpenGL ES is that it is pretty platform-independent, so you might be able to build your renderer in such a way that it can easily be transplanted from iPhone to Android, the desktop, etc.

    In general, my recommendation has been to look to Core Animation first to see if it can do what you want, because you’ll be able to build an application much faster this way. If that’s not appropriate, and you’re looking at doing a 2-D game, perhaps cocos2d would be a good path. I’ve not used the framework myself, but I’ve heard that it simplifies the process of doing 2-D OpenGL ES work. Only if neither of these approaches are appropriate should you drop down to OpenGL ES.

    If you’re curious, I do cover both Core Animation and OpenGL ES in the videos for my course on iTunes U, where you can skim through and see what’s needed to work in either environment.

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

Sidebar

Related Questions

I'm quite new in iPhone Programming, but I'm trying to do my best cause
When programming for the iPhone, I find that I often need to use the
I am programming an iPhone app, and I need to force it to exit
I'm learning iPhone programming from Erica Sadun's The iPhone Developer's Cookbook. When I run
I'm reading a post about iPhone programming and I've noticed that the talk about
I want to study Cocos2d, seems it's a good framework for iPhone game programming.
Programming is learned by writing programs. But code reading is said to be another
i want to know which parsing method is best to use among Simple XML
I'm new to iPhone and Objective C programming but I'm able to make my
I am programming for Android 1.6, the following code works in 2.2 (API Level

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.