Q:

Custom Segue, Multiple Animations Not Syncing

There are a lot of excellent answers on this topic, but this one has me confused.
There are two commented out lines which don't seem to work properly. I'd like this custom segue to both slide AND shrink so that the effect is for the fromVC to disappear up into nothing and the toVC to arrive from nothing from the bottom. 
However, if I try to do both simultaneously it fails. Either individually work fine (a zoom or a slide), but not together. 
class UnwindScaleSegue: UIStoryboardSegue {
    override func perform() {
        scaleDown()
    }

    func scaleDown() {
        let toVC = self.destination
        let fromVC = self.source     
        let screenHeight = UIScreen.main.bounds.size.height    

        toVC.view.transform = CGAffineTransform.init(translationX: 0.0, y: screenHeight)
        //toVC.view.transform = CGAffineTransform(scaleX: 0.001, y: 0.001)

        fromVC.view.superview?.insertSubview(toVC.view, at: 0)
        UIView.animate(withDuration: 0.5, delay: 0, options: .curveEaseInOut, animations: {
            //fromVC.view.transform = CGAffineTransform(scaleX: 0.001, y: 0.001)
            fromVC.view.transform = CGAffineTransform.init(translationX: 0.0, y: -screenHeight)

            toVC.view.transform = CGAffineTransform.identity
        }, completion: { success in
            fromVC.dismiss(animated: false, completion: nil)
        })
    }
}

A:

Solved! It turns out it has to do with how the transforms are combined. I'm not certain I understand, but something having to do with the vector nature of the transformations means you have to be careful when doing multiple transforms in the same animation. 
By "concatenating" them carefully it works! However, for me, if I swapped the order, it didn't work. 
The key lines are starred.
class UnwindScaleSegue: UIStoryboardSegue {

    override func perform() {
        scaleAway()
    }

    func scaleAway() {
        let toVC = self.destination
        let fromVC = self.source

        let screenHeight = UIScreen.main.bounds.size.height

        var translate = CGAffineTransform(translationX: 0.0, y:screenHeight) //**
        let scale = CGAffineTransform(scaleX: 0.001, y: 0.001) //**

        toVC.view.transform = scale.concatenating(translate) //**

        fromVC.view.superview?.insertSubview(toVC.view, at: 0)

        UIView.animate(withDuration: 0.5, delay: 0, options: .curveEaseInOut, animations: {
            translate = CGAffineTransform(translationX: 0.0, y: -screenHeight) //**
            fromVC.view.transform = scale.concatenating(translate) //**

            toVC.view.transform = CGAffineTransform.identity
        }, completion: { success in
            fromVC.dismiss(animated: false, completion: nil)
        })
    }
}

