     //MARK: - Private methods
     //
     private func createSnapshotView(from: UIView) -> UIView {
-        let snapshotViewOptional = from.snapshotView(afterScreenUpdates: true)
-        guard let snapshotView = snapshotViewOptional else {
-            fatalError("Invalid snapshot view")
-        }
-        snapshotView.frame = from.frame
+        guard let snapshotView = from.snapshotView(afterScreenUpdates: true) else {
+            print("Invalid snapshot view. Default color will be used")
+            let placeholderView = UIView()
+            placeholderView.frame = from.frame
+            placeholderView.backgroundColor = from.backgroundColor
+            addShadow(toView: placeholderView)
+            return placeholderView
+        }
         addShadow(toView: snapshotView)
-
         return snapshotView
     }
 

        let totalWidth = screenWidth - options.visibleContentWidth

        guard let contentSnapshotView = self.contentSnapshotView else {
            fatalError("Invalid 'contentSnapshotView' value. This property should not be nil")
        }
        
        if present {

        } else {
            contentSnapshotView.isHidden = true

            guard let toViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to) else {
                fatalError("Invalid toViewController key. Can't update transition")
            }
            let newX = totalWidth * (1 - percentComplete)

            let newScale = options.contentScale + (1 - options.contentScale) * percentComplete
