HeroTransitions / Hero

Elegant transition library for iOS & tvOS

Home Page:https://HeroTransitions.github.io/Hero/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The layer property `anchorPoint` animation does not work.

cloxnu opened this issue · comments

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