# Chapter 18: UINavigationController Custom Transition Animations

**URL:** <https://forums.kodeco.com/t/chapter-18-uinavigationcontroller-custom-transition-animations/118022>\
**Category:** iOS Animations by Tutorials\
**Created:** [August 20, 2020, 9:26pm UTC](https://forums.kodeco.com/t/chapter-18-uinavigationcontroller-custom-transition-animations/118022 "2020-08-20T21:26:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bakoabdullah](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bakoabdullah/32/81494_2.png) [@bakoabdullah](https://forums.kodeco.com/u/bakoabdullah)\
**Post date:** [August 20, 2020, 9:26pm UTC](https://forums.kodeco.com/t/chapter-18-uinavigationcontroller-custom-transition-animations/118022/1 "2020-08-20T21:26:22Z")

</div>

hello in this chapter of the book there is something I can’t understand:  
let maskLayer: CAShapeLayer = RWLogoLayer.logoLayer()  
maskLayer.position = fromVC.logo.position  
toVC.view.layer.mask = maskLayer  
maskLayer.add(animation, forKey: nil)  
fromVC.logo.add(animation, forKey: nil)  
why we added the animation to the mask ? I know it doesn’t work well otherwise but why?

---

<div class="post-metadata">

**Author:** ![gdelarosa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gdelarosa/32/109063_2.png) [@gdelarosa](https://forums.kodeco.com/u/gdelarosa)\
**Post date:** [August 22, 2020, 9:40pm UTC](https://forums.kodeco.com/t/chapter-18-uinavigationcontroller-custom-transition-animations/118022/2 "2020-08-22T21:40:29Z")

</div>

Hello and welcome to the forum @bakoabdullah! From my understanding of this is that CAShapeLayer inherits from CALayer which is part of the Core Animation framework. Using CAShapeLayer is great for performance since Core Animation is doing the heavy lifting for the animation to look crisp on every device. And because you are using CAShapeLayer it can handle drawing path-based shapes. Hope this helps.

Best,  
Gina

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [February 3, 2021, 1:26pm UTC](https://forums.kodeco.com/t/chapter-18-uinavigationcontroller-custom-transition-animations/118022/3 "2021-02-03T13:26:26Z")

</div>

Closed on February 3, 2021, 1:26pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
