# TransformAnimation **Repository Path**: kmyhy/transform-animat ## Basic Information - **Project Name**: TransformAnimation - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-15 - **Last Updated**: 2021-09-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # TransformAnimation - An simple navigation transition animation TransformAnimation implement a functional navigation transition animation which is used to replace the system default navigation controller push animation : When we click the Button in the first view controller, the transition animation will begin. The animation start with a big image presented at view's center, then quickly translate and scale down to a small image on right bottom corner. When the animation ended, the navigation controller will present second view controller. ## How to use it First of all, you need to drag these file to your own project: * UIView+Extension.swift * TransformAnimator.swift Then you need two View Controllers to implement TransformAinmationViewController which only includes 2 properties: ```swift protocol TransformAnimationViewController { var animator: TransformAnimator { get } var animatingView: UIView { get } } ``` For example, We will premise there are two view controllers: FirstViewController and SecondViewController. They have to implement these two properties: ```swift var animator = TransformAnimator() var animatingView: UIView { return imageView } ``` Note that the animator is a stored property, you can't implement it in extension. The animatingView is a UIView that you will commit animation with it, typtically, it's a UIImageView(usally it's also an IBOutlet ) like the bottle image at the begining of this article. Then add this line in their viewDidAppear methods: ```swift navigationController?.delegate = animator ``` In the same time, you also need to add this line in their viewDidDisappear methods: ```swift navigationController?.delegate = nill ``` Build & run. Congrats! You implemented a awesome navigation transitioning animation!