Swift 3: como faço para beliscar para redimensionar e girar o UIImageView?

Estou realmente lutando para encontrar tutoriais on-line, além de perguntas já respondidas (eu tentei e elas parecem não funcionar). Eu tenho um UIImageView que tenho no centro da minha exibição. Atualmente, sou capaz de tocar e arrastar isso para onde quiser na tela. Quero poder beliscar para escalar e girar essa visualização. Como faço para conseguir isso? Eu tentei o código para rotação abaixo, mas ele não parece funcionar? Qualquer ajuda será uma ajuda enorme e marcada como resposta. Obrigado pessoal.

    import UIKit

class DraggableImage: UIImageView {

    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

        self.backgroundColor = .blue

    }

    override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {

        self.backgroundColor = .green

    }

    override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
        if let touch = touches.first {
            let position = touch.location(in: superview)
            center = CGPoint(x: position.x, y: position.y)
        }
    }

}

class CVController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .white

        let rotateGesture = UIRotationGestureRecognizer(target: self, action: #selector(rotateAction(sender:)))
        firstImageView.addGestureRecognizer(rotateGesture)

        setupViews()
    }

    func rotateAction(sender: UIRotationGestureRecognizer) {
        let rotatePoint = sender.location(in: view)
        let firstImageView = view.hitTest(rotatePoint, with: nil)
        firstImageView?.transform = (firstImageView?.transform.rotated(by: sender.rotation))!
        sender.rotation = 0
    }

    let firstImageView: DraggableImage = {
        let iv = DraggableImage()
        iv.backgroundColor = .red
        iv.isUserInteractionEnabled = true
        return iv
    }()

    func setupViews() {
        view.addSubview(firstImageView)

        let firstImageWidth: CGFloat = 50
        let firstImageHeight: CGFloat = 50

        firstImageView.frame = CGRect(x: (view.frame.width / 2) - firstImageWidth / 2, y: (view.frame.height / 2) - firstImageWidth / 2, width: firstImageWidth, height: firstImageHeight)
    }

}

questionAnswers(1)

yourAnswerToTheQuestion