Comments (20)
+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.
Thanks for the report. I'm going to investigate today and see if we can get to the bottom of this.
from pop.
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.
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.
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.
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.
👍 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.
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.
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.
Can report this fixes my issue perfectly!
from pop.
@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.
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.
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.
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=0first 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.
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.
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.
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.
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.
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.
@xquezme worked like a charm and fixed the stutter, thanks!
from pop.
Related Issues (20)
- paper link does not exist
- Couldnt be able to integrate this with Swift 3.0 project by following the same commands. HOT 1
- No such file or directory error while building the workspace
- Errors should be thrown when animation parameters don't match animation parameters
- In memory of the Facebook Paper HOT 1
- Why not kPOPLayerRotationZ this enumeration? I want to rotate the animation around the Z axis. HOT 2
- Cannot works with Snapkit?
- Do you have the scenekit+pop demo?
- iostream file not found - Xcode 9.3.1 - Swift 4 HOT 3
- How to get the progress of the animation
- _POPPropertyAnimationState isPaused reset the progress
- Installation
- CocoaPods update HOT 5
- If toValue equals the target's current value then completionBlock will fire immediately HOT 1
- Carthage issue HOT 1
- problem with same animation HOT 1
- i feel confused ,what the function work for ‘ [self _scheduleProcessPendingList]’
- POPSpringAnimation removedOnCompletion not working
- Spring animation not working anymore following iOS 13 update HOT 5
- Swift Package Manager Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pop.