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 layer property anchorPoint animation does not work. #741

Closed
cloxnu opened this issue Aug 28, 2022 · 0 comments · Fixed by #742
Closed

The layer property anchorPoint animation does not work. #741

cloxnu opened this issue Aug 28, 2022 · 0 comments · Fixed by #742

Comments

@cloxnu
Copy link
Contributor

cloxnu commented Aug 28, 2022

The layer property anchorPoint animation does not work, it is set to the value of the last frame at the start of the animation

What did you do?

// ViewController 1
let view1 = UIView()
view1.heroID = "view"
view1.bounds.size = CGSize(width: 100, height: 100)
view1.layer.anchorPoint = CGPoint(x: 0.5, y: 0.5)
view1.layer.position = CGPoint(x: 100, y: 100)

// ViewController 2
let view2 = UIView()
view2.heroID = "view"
view2.bounds.size = CGSize(width: 100, height: 100)
view2.layer.anchorPoint = CGPoint(x: 0, y: 0)
view2.layer.position = CGPoint(x: 200, y: 200)

What did you expect to happen?

view1 transition to view2 smoothly.

What happened instead?

The anchorPoint of view2 is set to the value of the last frame at the start of the transition.

2022-08-29.02.19.13.mov

General Information

  • Hero Version: lastest develop branch

  • iOS Version(s): 15.5

  • Swift Version: 5.6

  • Devices/Simulators: iPhone 13 Pro

  • Reproducible in Examples? (Yes/No): Yes

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

Successfully merging a pull request may close this issue.

1 participant