• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem with UIViewAnimationOptionBeginFromCurrentState
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with UIViewAnimationOptionBeginFromCurrentState


  • Subject: Problem with UIViewAnimationOptionBeginFromCurrentState
  • From: Marc Palmer <email@hidden>
  • Date: Wed, 27 Aug 2014 12:30:18 +0100

Hi,

I wonder if anybody can help me out here.

I have an animation where a view moves vertically up the screen when the user presses and holds a UI element, and when the user lets go it drops down again.

I have it such that the user can interrupt the fall or rise - i.e. when rising you can let go before the end and the fall animation begins from the current state.

This is all well and good, using UIViewAnimationOptionBeginFromCurrentState and removing the current animations on the layer.

However if the view is falling and mid way through the user presses the UI element again, and we resume the rise animation - we find that there is a small vertical jump in the position of the view as the rise animation starts.

This jump is dependent on the vertical velocity of the view at the time of changing direction - so it seems there is some issue with the presentation state of the layer not being correct (it seems slightly behind in time) at the time of our rise animation restarting.

Does this ring a bell with anybody? Am I missing something else related to using the current presentation state of the layer?

The (short) code roughly boils down to the code in this gist:

https://gist.github.com/marcpalmer/6eb3b6c6e9cef5fd0a8a


So basically I can't figure why the presentation layer appears to be out of step with what is displayed, if the in-flight animation at the time of switching animations has any significant velocity.

Thanks in advance for any tips.

--
Marc Palmer
CEO Montana Floss Co. Ltd.

Soundproof – Music Player for Practice
http://getsoundproof.com

iOS App Development
http://montanafloss.co






_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: What exactly does NSDocumentController do when there's no NSDocument architecture?
  • Next by Date: Re: WebView shorting me on print jobs.
  • Previous by thread: Re: What exactly does NSDocumentController do when there's no NSDocument architecture?
  • Next by thread: Prompting user (NSAlert) during document reading
  • Index(es):
    • Date
    • Thread