 
     /// Removes all snapshots that are not using .useNoSnapshot.
     func removeAllSnapshots() {
-        for (k, v) in viewToSnapshot {
-            if k != v {
-                v.removeFromSuperview()
+        for (view, snapshot) in viewToSnapshot {
+            if view != snapshot {
+                snapshot.removeFromSuperview()
+            } else {
+                view.layer.removeAllAnimations()
             }
         }
     }

    /// Restores the transition subview map with its superview.
    func clean() {
        for (superview, subviews) in superviewToNoSnapshotSubviewMap {
            for (index, view) in subviews.reversed() {
                superview.insertSubview(view, at: index)
            }
        }
    }

import UIKit

public class MotionContext {
    /// A reference of motion identifiers to source views.
    internal var motionIdentifierToSourceView = [String: UIView]()
    
    /// A reference of motion identifiers to destination views.
    internal var motionIdentifierToDestinationView = [String: UIView]()
    
    /// A reference of the snapshot to source/destination view.
    internal var viewToSnapshot = [UIView: UIView]()
    
    /// A reference to the view to view alpha value.
    internal var viewToAlphas = [UIView: CGFloat]()
    
    /// A reference of view to transition target state.
    internal var viewToTargetState = [UIView: MotionTargetState]()
    
    /// A reference of the superview to the subviews snapshots.
    internal var superviewToNoSnapshotSubviewMap = [UIView: [(Int, UIView)]]()
    
    /// Inserts the toViews first.
    internal var insertToViewFirst = false
    
    /// A reference to the default coordinate space for transitions.
    internal var defaultCoordinateSpace = MotionCoordinateSpace.local
