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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:42:12+00:00 2026-05-13T05:42:12+00:00

This is my first question her so please be gentle: I have followig animation

  • 0

This is my first question her so please be gentle:
I have followig animation code running smoothly on the simulator as well as on the real device (I am testng on iPhone 3GS 3.1.2).
Animation is a simple transition between the 2 views, something like book page flipping.

One diffrence betwen simulator an real device (The problem I cannot investigate – solve) is that on real device when animation finishes – after rotation has been done animated view blink (show for a split of second) for a moment before it goes hidden. On the simulator this ‘unexpected’ blink does not happen.

Here is the animation code:

-(void)flip{
    UIView *animatedView;

    // create an animation to hold the page turning
    CABasicAnimation *transformAnimation = [CABasicAnimation animationWithKeyPath:@"transform"];
    transformAnimation.removedOnCompletion = NO;
    transformAnimation.delegate = self;
    transformAnimation.duration = ANIMATION_TIME;
    transformAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];

    // this is the basic rotation by 90 degree along the y-axis
    CATransform3D endTransform = CATransform3DMakeRotation(3.141f/2.0f,
                                                           0.0f,
                                                           -1.0f,
                                                           0.0f);
    // these values control the 3D projection outlook
    endTransform.m34 = 0.001f;
    endTransform.m14 = -0.0015f;


    // start the animation from the current state
    transformAnimation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
    transformAnimation.toValue = [NSValue valueWithCATransform3D:endTransform];
    animatedView = screenShot;

    // Create an animation group to hold the rotation and possibly more complex animation in the future
    CAAnimationGroup *theGroup = [CAAnimationGroup animation];

    // Set self as the delegate to receive notification when the animation finishes
    theGroup.delegate = self;
    theGroup.duration = ANIMATION_TIME;
    // CAAnimation-objects support arbitrary Key-Value pairs, we add the UIView tag
    // to identify the animation later when it finishes
    [theGroup setValue:[NSNumber numberWithInt:animatedView.tag] forKey:@"animated"];
    // Here you could add other animations to the array
    theGroup.animations = [NSArray arrayWithObjects:transformAnimation,nil];
    theGroup.removedOnCompletion = NO;
    // Add the animation group to the layer
    if (animatedView.layer.anchorPoint.x != 0.0f) 
    {
        animatedView.layer.anchorPoint = CGPointMake(0.0f, 0.5f);
        float yy = animatedView.center.x - (animatedView.bounds.size.width / 2.0f);
        animatedView.center = CGPointMake(yy, animatedView.center.y);
    }

    if(![animatedView isDescendantOfView:self.view])[self.view addSubview:animatedView];
    screenShot.hidden = NO;
    animatedView.hidden = NO;


    [animatedView.layer addAnimation:theGroup forKey:@"flip"];

}

- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag {

    screenShot.hidden = YES;

}
  • 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-13T05:42:12+00:00Added an answer on May 13, 2026 at 5:42 am

    Try setting theGroup’s and / or transformAnimation’s fillMode to kCAFillModeForwards:

    theGroup.fillMode = kCAFillModeForwards;
    

    This should cause your animation to persist once its active duration has completed. I’ve used this to remove an end-of-animation flicker before.

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

Sidebar

Related Questions

This is my first question, so please be gentle. I'm trying out Apache Camel
this is my first question I have searched for any launching activity questions and
this is my first question here so be gentle ! recently i try to
this is the first question I post in this site, so you have to
Note: A have asked this question at the Superuser community first , but since
This is my first question on stackoverflow, so please bear with me if I
This is my first question in stack overflow. Please be liberal in validating it
This is my first question on StackOverflow, can you please explain to me what
This is my first question so please be patience.This question may sounds childish but
this is my first question in here, and I would like to ask if

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.