in your case, if you use self.present and you want to send data between the presentations. Try the following:
let viewController:UIViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "modo") as! Modo1ViewController viewController.nomb = nombres self.present(viewController, animated: false, completion: nil)
I don't know how to set the segue id, but I think the code above might help
If you want to make the job easier, you can create a segue in IB (Interface Builder) and set its identifier, and then use
performSegue:withIdentifier:sender
Nguyễn Anh Việt
source share