     var startingCornerRadius = CGFloat(14)
     var otherAppZoomScale = CGFloat(5)
     var wallpaperZoomScale = CGFloat(1.5)
-    var duration = TimeInterval(0.3)
+    var duration = TimeInterval(0.5)
     
     init(appIconButton: UIButton, springBoardViewController: SpringBoardViewController, isPresenting: Bool) {
         self.appIconButton = appIconButton

        appIconContainerView.layer.add(animation, forKey: "cornerRadius")
    }
    
    func snapshotImageForZoomingAppIcons(from viewController: SpringBoardViewController) -> UIImage {
        let springBoardView = viewController.containerView
        // Slightly increase the scale here so that when the image is zoomed things still look sharp
        let imageScale = springBoardView.window!.screen.scale * 2

    }
    
    func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
        let containerView = transitionContext.containerView
        let toViewController = transitionContext.viewController(forKey: .to)!
        let fromViewController = transitionContext.viewController(forKey: .from)!
        let toView = toViewController.view!
        
        let finalFrame = transitionContext.finalFrame(for: fromViewController)
        let appInitialView = isPresenting ? toView : fromViewController.view!
        let appIconFrame = appIconButton.convert(appIconButton.frame, to: nil)
        
        let wallpaperSnapshotView = springBoardViewController.wallpaperView.snapshotView(afterScreenUpdates: false)!
        containerView.addSubview(wallpaperSnapshotView)
        
        let (appCollectionContainerView, appCollectionSnapshotView) = setupAppCollectionContainerView(for: containerView.bounds, appIconFrame: appIconFrame)
        containerView.addSubview(appCollectionContainerView)
        
        // TODO: can just set this frame afterwards?
        let (appIconContainerView, appInitialViewSnapshot) = setupAppIconContainerView(for: appIconFrame, with: appInitialView)
        containerView.addSubview(appIconContainerView)

        // Initialize frame values
        appCollectionContainerView.frame = containerView.bounds
        wallpaperSnapshotView.frame = containerView.bounds

        // Setup a block used for updating views for animation states
        let updateViewsForAnimation: (Bool) -> () = { isLaunched in
            appCollectionContainerView.transform = isLaunched ? CGAffineTransform(scaleX: self.otherAppZoomScale, y: self.otherAppZoomScale) : CGAffineTransform.identity
            wallpaperSnapshotView.transform = isLaunched ? CGAffineTransform(scaleX: self.wallpaperZoomScale, y: self.wallpaperZoomScale) : CGAffineTransform.identity
            appIconContainerView.frame = isLaunched ? finalFrame : appIconFrame
            appCollectionSnapshotView.alpha = isLaunched ? 0 : 1
            appInitialViewSnapshot.alpha = isLaunched ? 2 : 0
        }
        
        // Initialize views for the current state (not the end animated state)
        updateViewsForAnimation(!isPresenting)
        
        // Build animation
        let curveProvider = UISpringTimingParameters(dampingRatio: 1)
        let animator = UIViewPropertyAnimator(duration: duration, timingParameters: curveProvider)
        animator.addAnimations {
            updateViewsForAnimation(self.isPresenting)
        }
        animator.addCompletion { (position) in
            appIconContainerView.removeFromSuperview()
            wallpaperSnapshotView.removeFromSuperview()
            appCollectionContainerView.removeFromSuperview()
            
            if self.isPresenting {
                containerView.addSubview(toView)
            }
            
            transitionContext.completeTransition(position == .end && !transitionContext.transitionWasCancelled)
        }
        animator.startAnimation()
        
        // Animate corner radius seprately since CALayer properties can't be animated
