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

Different maskedCorners for different views don't animate properly

tkuziola opened this issue · comments

What did you do?

I have two views in two different viewControllers:

OneViewController

containerView.layer.cornerRadius = 40
containerView.layer.maskedCorners = [.layerMaxXMinYCorner]

TwoViewController

containerView.layer.cornerRadius = 40
containerView.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMaxYCorner, .layerMaxXMaxYCorner]

What did you expect to happen?

I expected that It will smoothly animate corners that aren't rounded to rounded in the second view controller

What happened instead?

One corner that is not rounded (left, top corner) is animated to rounded and after animation it is switched to sharped. Similar thing happened here #40, but this issue was for all corners, not for some of them.

I tried mixing with maskToBounds and clipToBounds, but nothing helped.

General Information

  • Hero Version: 1.5

  • iOS Version(s): 14.3

  • Swift Version: 5

  • Devices/Simulators: iPhone 12 Pro

Did bbcb425 fix this issue?

Update to 1.6.0 to test.

Yep! 1.6 solved the issue!