HeroTransitions / Hero

Elegant transition library for iOS & tvOS
https://HeroTransitions.github.io/Hero/
MIT License
22.05k stars 1.73k forks source link

Different maskedCorners for different views don't animate properly #699

Closed tkuziola closed 3 years ago

tkuziola commented 3 years ago

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 https://github.com/HeroTransitions/Hero/issues/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

JoeMatt commented 3 years ago

Did bbcb4250ca7945dd9b46b4aed1dd70b86c1818ee fix this issue?

Update to 1.6.0 to test.

tkuziola commented 3 years ago

Yep! 1.6 solved the issue!