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

The Archive Base Latest Questions

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

I trying to do an animation on the iPhone and I hope someone can

  • 0

I trying to do an animation on the iPhone and I hope someone can help me out here as I’m stumped.

I am using CAKeyframeAnimation with CAPath to animate views around.

I have these settings set:

animation.removedOnCompletion = YES; 
animation.fillMode = kCAFillModeRemoved;

So that the animation is removed from the layer when the animation finishes I want the view to respond to touches. As I have found that if I set:

animation.removedOnCompletion = NO;
animation.fillMode = kCAFillModeForwards;

then the view no longer responds to touches after the animation.

This has also had the negative side effect of having to manually position the view to its finished location when the animation finishes.

The theory of what I’m doing works but in practice there is a jump of the view back to its original position before I can manually set its position in the animationDidStop method.

So is it possible to have the final position of animation stay and the view respond to touches?

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

    Setting the fill mode to kCAFileModeForwards causes the animation to appear as if it is at the last step in the animation, but it is only the appearance. You actually need to set whichever property you are animating. If it’s the position, you need to call:

    [layer setPosition:destinationPoint];
    

    on the layer. Then you don’t have to set the fill mode or tell it not to remove the animation on completion. You will need to make sure that you set the animation for key “position” in order to override the default animation with your own. Call -setPosition before you add the animation to the layer. Something like this:

    [layer setPosition:destinationPoint];
    [layer addAnimation:kfAnimation forKey:@"position"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying out the animation stuff with the iPhone and I have a small
I'm trying to implement a gauge animation using (+ and - buttons) on iphone,
I'm trying out jQuery masonry animation examples, and managed to get a basic page
I am trying to implement a game using the iPhone OS 4.0 (iOS4?) SDK.
I'm trying to create a page curl animation of an image in my iPhone
Im using phonegap + jquery + jquery iphone touch: http://www.midemos.com/demos/iphone/touch/?/iphone/touch/ Im trying to get
I'm trying to sync animation to music at a specific BPM. I've tried using
I'm trying to get animation working using Artefact Animator: Artefact on Codeplex The relevant
I'm new to iPhone development and I'm trying to do a flip animation between
This problem should be simple enough, i am trying to learn animation using javascript

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.