ios 新しいclass file

file -> new -> file -> cocoa file

新しく作ったcocoa classをview controllerと紐づける

ふむふむ

prepare func

class ViewController: UIViewController {

    @IBOutlet weak var nameText: UITextField!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    ovrride func prepare(for seque: UIStoryboardSeque, sender: Any?)
    {
        let resultVC = seque.destination as! ResultViewController
        resultVC.myName = self.nameText.text!
    }


}