Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Animation #46

Open
sisomollov opened this issue Dec 22, 2016 · 3 comments
Open

Spring Animation #46

sisomollov opened this issue Dec 22, 2016 · 3 comments
Assignees

Comments

@sisomollov
Copy link

I think there is some small bug with the spring animation. The completion block it's never been called.

        var newFrame = view.frame
        newFrame.size.height = 50

        UIView.animate(
            withDuration: 1.25,
            delay: 0,
            usingSpringWithDamping: 0.65,
            initialSpringVelocity: 0.75,
            options: [],
            animations: {
                self.testLayer.frame = newFrame
        }) { _ in
            print("Tralala!")
        }
@icanzilb
Copy link
Owner

thanks for reporting, could you please try with another property like alpha to check if it's a property name related problem?

@sisomollov
Copy link
Author

yep with this code

        var newFrame = view.frame
        newFrame.size.height = 50

        UIView.animate(
            withDuration: 1.25,
            delay: 0,
            usingSpringWithDamping: 0.65,
            initialSpringVelocity: 0.75,
            options: [],
            animations: {
                self.testLayer.frame = newFrame
                self.view.alpha = 0.25
        }) { _ in
            print("Tralala!")
        }

works and completion block is called.

@icanzilb
Copy link
Owner

interesting - it must have to do with frame being a composed property (position and bounds), I will look into debugging this and thanks for reporting

@icanzilb icanzilb self-assigned this Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants