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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:35:26+00:00 2026-05-25T22:35:26+00:00

I animate 2 views, each one with its CAAnimationGroup that contains 2 CAAnimations. They

  • 0

I animate 2 views, each one with its CAAnimationGroup that contains 2 CAAnimations. They are launched at the same time (if computing time is negligible), and have the same duration.

How may I do to know when both grouped animation is finished.

I put the - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag delegate method, but… What may I test ? Sounds simple, but I don’t see the way of doing this.

  • 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-25T22:35:27+00:00Added an answer on May 25, 2026 at 10:35 pm

    You can use two variables to track whether the animations have completed:

    BOOL firstAnimFinished;
    BOOL secondAnimFinished;
    

    then in your animationDidStop delegate you check which animation is calling the method and set the flags appropriately. The catch is that you’ll need to add a key to identify the animations when they call the delegate (the animations you created will not be the ones calling the delegate, which is a subject for another question/rant). For example:

    // when you create the animations
    [firstAnmim setValue: @"FirstAnim" ForKey: @"Name"];
    [secondAnmim setValue: @"SecondAnim" ForKey: @"Name"];
    
    // Your delegate
    - (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)flag {
        NSString* name = [theAnimation valueForKey: @"Name"];
        if ([name isEqualToString: @"FirstAnim"]) {
            firstAnimFinished = YES;
        } else if ([name isEqualToString: @"SecondAnim"]) {
            secondAnimFinished = YES;
        }
        if (firstAnimFinished && secondAnimFinished) {
            // ALL DONE...
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using a layoutanimation on one of my views. android:layoutAnimation=@anim/animate_layout The animation is done each
I have an iphone app that uses table view as the interface. Each time
I am using the flip animation to animate between two views in my viewcontroller.
Is it possible to animate the change of a UIProgressView such that the display
I have an application with a tab bar controller and each view contains a
For an app that I am writing I need to display several views (in
I have this same code at the end of each view to go to
I have a UINavigationController with two screens - each screen with its own nav
- i have a FirstViewController and a SecondViewController, each has its xib - in
I want to draw a line(on iphone) such that i can view each pixel

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.