Giter Club home page Giter Club logo

Comments (20)

waltflanagan avatar waltflanagan commented on June 13, 2024

+1

I've seen similar behavior while using POPSpringAnimation's during custom view controller transitions.

In my case the animation just involves changing a view's center.

from pop.

kimon avatar kimon commented on June 13, 2024

Thanks for the report. I'm going to investigate today and see if we can get to the bottom of this.

from pop.

waltflanagan avatar waltflanagan commented on June 13, 2024

Thanks. For a bit of added context, for me the call stack showed it was inside the system committing a core animation transaction and triggering a layoutsublayers. My workaround was to also animate my transition with [UIView animate:] on the view, which was the clobbered by the pop animation.

If you have any other questions let me know, i'll do my best to find more info to help debug.

from pop.

waltflanagan avatar waltflanagan commented on June 13, 2024

Here is another video of the issue. Going frame by frame with quicktime should make it apparent what we're seeing.
https://www.dropbox.com/s/9323dzercmwimhe/PopBug.mov

from pop.

kimon avatar kimon commented on June 13, 2024

Thanks, the code and video has been very helpful. The fromValue isn't applied until the next iteration of the runloop, meaning the underlying initial model value will poke through. As a temporary work around you can set the initial object value instead of (or in addition) to the animation fromValue. With regard to @zdavison's example there were a few other issues surrounding 0 scale that also need to be addressed. Should have a fix shortly.

from pop.

kimon avatar kimon commented on June 13, 2024

We have the first pass of a fix in master. It was a non-trivial change so let me know how you fare. Definitely a good bug and something I hope we can address in the next release. Thanks for the help all.

from pop.

zdavison avatar zdavison commented on June 13, 2024

👍 thanks for the quick response! I'll test and let you know of any issues.—
Sent from Mailbox for iPhone

On Wed, May 14, 2014 at 5:30 PM, Kimon Tsinteris [email protected]
wrote:

We have the first pass of a fix in master. It was a non-trivial change so let me know how you fare. Definitely a good bug and something I hope we can address in the next release. Thanks for the help all.

Reply to this email directly or view it on GitHub:
#61 (comment)

from pop.

kimon avatar kimon commented on June 13, 2024

We've been living on this new version internally and so far so good. I've tagged a 1.0.5 release and amongst other changes included this fix. As soon as CocoaPods/Specs#11941 gets pulled into CocoaPods, look for this being fixed in production Pop. Thanks again for the report.

from pop.

waltflanagan avatar waltflanagan commented on June 13, 2024

Just got the chance to test this and I'm still seeing the behavior when a POPSpringAnimation is used within the context of custom view controller transitions.

I've created a sample project that exhibits the behavior in the simulator, but less reliably on device: https://github.com/waltflanagan/POP-SingleFrameBug

On device it takes a few tries before the bug shows up.

from pop.

zdavison avatar zdavison commented on June 13, 2024

Can report this fixes my issue perfectly!

from pop.

grp avatar grp commented on June 13, 2024

@waltflanagan, could you try using Pop's tracing features to check the values applied from your animation? They should confirm that the correct value is being set initially or if it is not.

A common alternate solution, that has been used successfully in the past, is to set the initial value yourself at the same time that you create your Pop animation. That way, you can be sure that the initial value is always applied correctly.

from pop.

waltflanagan avatar waltflanagan commented on June 13, 2024

Yup, the values coming out of POP seem to be accurate in both my main app and the demo project.

Mostly hoping there was something that could be done under the hood to help them play better with custom transitions.

Merely setting the initial values on the views doesn't solve the problem in this case. I'm guessing this has to do with how iOS sets up the transition context in preparation for normal view animating. The only way that I have found around the issue is to start a parallel UIView animation putting my views in at the same destination. This seems to cause the transition context to actually pay attention to initial values behind the scenes?

I'm fine with this being labelled not a bug in POP, just wanted to raise awareness of an edge-case that requires a bit of extra work.

So I know whether or not I'm crazy, have you been able to see the issue in the sample project (either on device or in the simulator)?

from pop.

grp avatar grp commented on June 13, 2024

If setting the values yourself doesn't work, I'm not sure how much Pop can do, since the animatable property is just setting the value itself. (I haven't tried building for device to see how it works there.)

from pop.

kimon avatar kimon commented on June 13, 2024

Sounds easy to hit. Do you mind attaching the simplest of sample apps? That will help speed up the investigation

Sent from my iPhone

On Wed, Jan 7, 2015 at 12:58 AM, yaron walter [email protected]
wrote:

same here , when using POPBasicAnimation and fromValue , but with multiple times
https://www.dropbox.com/s/70540el22om3ys4/Untitled%203.m4v?dl=0

first time the frame is okay , the second time the frame get bigger then excepted

Reply to this email directly or view it on GitHub:
#61 (comment)

from pop.

vburojevic avatar vburojevic commented on June 13, 2024

I've noticed this issue now in the latest version when using POP in custom controller transition.
Like @kimon said, temporary workaround is to set initial value of the frame.

Can you please take a look at this again?
Frame sometimes flashes before animation starts.

from pop.

patr1ck avatar patr1ck commented on June 13, 2024

I'm seeing the same issue as @waltflanagan, specifically a POPSpringAnimation being applied to a layer position during an animated transition. I'll see if I can whip up a sample app. (👋)

from pop.

grp avatar grp commented on June 13, 2024

I would still suggest trying to set the values manually without Pop. If you still issue the issue just setting the property manually, there's not a lot Pop can do to get around that.

from pop.

bryson1024 avatar bryson1024 commented on June 13, 2024

This seems to still be an issue. A really, really hacky solution I've found is to add the subview after a delay of .01 seconds. Seems to bypass the flash.

from pop.

xquezme avatar xquezme commented on June 13, 2024

Quick fix:

layer.transform = CATransform3DMakeScale(0.001f, 0.001f, 1.f)
animation.fromValue = [NSValue valueWithCGSize:CGSizeMake(0.f, 0.f)];
[layer pop_addAnimation:animation forKey:@"scaleXY"];

from pop.

charlesvinette avatar charlesvinette commented on June 13, 2024

@xquezme worked like a charm and fixed the stutter, thanks!

from pop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.