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

The offset (delay doesn't work) #13

Open
DanielZanchi opened this issue Mar 19, 2018 · 0 comments
Open

The offset (delay doesn't work) #13

DanielZanchi opened this issue Mar 19, 2018 · 0 comments
Assignees
Labels

Comments

@DanielZanchi
Copy link

DanielZanchi commented Mar 19, 2018

hello, I'm trying to change some width constraints in chain animation but I'm having some problems:

        UIView.beginAnimationChain(0.3) {
            self.enterWidthConstraint.isActive = true
            self.enterWidthConstraint.constant = self.view.frame.width
            self.enterEqualWidthConstraint.isActive = false
            print("now 1")
            print(self.enterWidthConstraint.constant)
            }.chainAfterCompletion(0.25, delay: 2.0, options: [], animations: {
                print("now 2")
                self.enterWidthConstraint.constant = 0
                print(self.enterWidthConstraint.constant)
            }).animate()

the output gets printed all together:

now 1
375.0
now 2
0.0

The self.enterWidthConstraint.constant = 0 needs to be set after the first animation. This happens immediately 😟

@daehn daehn added the bug label Mar 19, 2018
@daehn daehn self-assigned this Mar 19, 2018
Repository owner deleted a comment Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants