Swift storyBoard 判断 segue 目标

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        if segue.identifier == "ModalToPassCode"{
            let destVC = segue.destination as! PassCodeViewController

            destVC.bikeCode = numberTextField.text!

            NetworkHelper.getPassCode(numberTextField.text!, completion: { (isSuccessed, passCode) in

                destVC.passCode = passCode!.characters.map{
                    return $0.description
                }

            })

        }
    }

你可能感兴趣的:(swift学习历程,IOS开发小知识点)