facebookarchive / pop

An extensible iOS and OS X animation library, useful for physics-based interactions.
Other
19.66k stars 2.88k forks source link

POPSpringAnimation acting weird on ios8+ #258

Closed onderozcan closed 9 years ago

onderozcan commented 9 years ago

I am using POPSpringAnimation in order to show PickerView with bounce effect animation and hide it.

I am using 2 methods show/hide. I made that app which works ios7 fine, But in iOS8, when user tap to select pickerView element following delegation method fired and sets text on label as expected.

-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component

But showing animation broken as soon as user selects row. And PickerView view has disappeared. I put breakpoint in every method in implementation but breakpoint doesn't call any hide animation method.

I really don't get it. Is there anyone who faced that problem ?

warpling commented 9 years ago

It's hard to tell what could be wrong from your description. Maybe you could post a stripped down example of the problem?

renssies commented 9 years ago

I might have the same problem. Do you have Pop imported using a embedded framework or do you use embedded frameworks with cocoapods? That seems to be my problem.

onderozcan commented 9 years ago

Hi renssies , I embedded fw with cocapods. Should i try to use importing fw without cocoapods ?

renssies commented 9 years ago

No I think that will give the same result. I guess some module isn't loaded correctly when it's a framework.

onderozcan commented 9 years ago

So what you offer to me? Should i remove it completely and load it again ?

renssies commented 9 years ago

If you have a Objective-C project you could disable the frameworks. If you have a swift project (like me) I still need to find the solution.

onderozcan commented 9 years ago

Mine is based objective-c , I will disable frameworks and try it again . 

-- 

Önder ÖZCAN Web & Mobile developer, Pixelblind m:90 507 725 5007 | e:onder@pixelblind.net | w:http://www.pixelblind.net | a: Karşıyaka - İZMİR    

On 23 Jul 2015 at 15:55:00, Rens Verhoeven (notifications@github.com) wrote:

If you have a Objective-C project you could disable the frameworks. If you have a swift project (like me) I still need to find the solution.

grp commented 9 years ago

I don't think embedded frameworks or method of installation would change how Pop behaves. Without code to demonstrate, it seems more likely the issue is with the animation you have configured than with Pop itself.

Have you checked to see if the animation you're using is conflicting with the implementation of UIPickerView on iOS 8? If you apply a Pop animation to a simple view in your app, does that work as expected?

renssies commented 9 years ago

How come than if I disable the embedded frameworks that it works just fine. But If I enable them the animation is all glitchy and never finishes?

This is not with a UIPickerView but with a UICollectionViewCell and a UIViewController but still it's happening.

        {
            POPSpringAnimation *scaleAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewScaleXY];
            scaleAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake([self scale], [self scale])];
            scaleAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(1.0 , 1.0f)];
            scaleAnimation.springBounciness = [self springBounciness];
            scaleAnimation.springSpeed = [self springSpeed];
            [scaleAnimation setCompletionBlock:^(POPAnimation *animation, BOOL done) {
                toViewController.view.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
                [self.collectionViewCell setHidden:NO];

                if (toProfileButton && fromProfileButton && profileButton) {
                    [toProfileButton setHidden:NO];
                    [fromProfileButton setHidden:NO];
                    [profileButton removeFromSuperview];
                }
            }];

            [toViewController.view pop_addAnimation:scaleAnimation forKey:@"issues_view_scale_animation"];
        }
grp commented 9 years ago

It's hard to say without debugging it further myself. You might use the animation tracer feature to try and track down where it's going wrong? It's weird that a framework versus static library would affect behavior significantly, but weird things happen!