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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:49:01+00:00 2026-05-24T13:49:01+00:00

What I basically want to do is tp display a sequence of images at

  • 0

What I basically want to do is tp display a sequence of images at a fast rate (60/second) in order to create a sequence. I’m going to create a timer and see if it’s fast enough.

I want to display an array of images in my cocoa app using an animation (up to 60 per seconds).

Here’s the animation I’ve created so far:

- (CAAnimation*)imageAnimation;
{
    CGImageRef image1 = [self nsImageToCGImageRef:[NSImage imageNamed:@"1.png"]];
    CGImageRef image2 = [self nsImageToCGImageRef:[NSImage imageNamed:@"2.png"]];
    CGImageRef image3 = [self nsImageToCGImageRef:[NSImage imageNamed:@"3.png"]];

    CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];

    NSArray *images = [NSArray arrayWithObjects:(id)image1, (id)image2, (id)image3, nil];

    [animation setValues:images];
    [animation setDuration:3.0];

    return animation;
}

where nsImageToCGImageRef is a method I’ve defined elsewhere. Now, I’m not sure where to go from here to add this animation to my views.

  • 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-24T13:49:03+00:00Added an answer on May 24, 2026 at 1:49 pm

    You should investigate CVDisplayLink, which allows you to receive a callback every time the Mac’s display subsystem is about to display a frame. This will let you display images at 60fps with no dropped frames, because the API only calls your code when it needs an update.

    This means you don’t need to worry about synchronising a timer with the display, and it also means that you are not doing unnecessary work. You can also do things such as update only on alternate callbacks to reduce the frame rate to 30fps if your drawing code is slow.

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

Sidebar

Related Questions

I want to display an image in a functional programming style. Basically, I operate
I want to display images into a ListBox in WPF. What i want to
I have a financial calculator in MS excel, and I basically want to display
I have the following code, and basically want it to display the term's slug
I want to display series of images one by one when the app loads.
Basically, I want to get and display the data of a midi note (the
I basically want to display a tooltip when someone first reaches the page, but
I basically want to display a rectangle on a dialog window widget. Using another
I want to basically create a list of Windows Controls. Lets say i have
I basically want something like: TextView Button Button . . . TextView TextView SeekBar

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.