unwind-segue

Passing data with unwind segue

杀马特。学长 韩版系。学妹 提交于 2019-11-26 11:22:47
I created two view controllers. I created a segue from the first to the second to pass data. Now I want to pass data from the second view controller to the first one. I went through many similar questions and I'm not able to implement those as I lack the knowledge on how unwinding works. ViewController.swift class ViewController: UIViewController { var dataRecieved: String? @IBOutlet weak var labelOne: UILabel! @IBAction func buttonOne(sender: UIButton) { performSegueWithIdentifier("viewNext", sender: self) } override func prepareForSegue(segue: (UIStoryboardSegue!), sender: AnyObject!) { var

Passing data with unwind segue

我怕爱的太早我们不能终老 提交于 2019-11-26 02:22:54
问题 I created two view controllers. I created a segue from the first to the second to pass data. Now I want to pass data from the second view controller to the first one. I went through many similar questions and I\'m not able to implement those as I lack the knowledge on how unwinding works. ViewController.swift class ViewController: UIViewController { var dataRecieved: String? @IBOutlet weak var labelOne: UILabel! @IBAction func buttonOne(sender: UIButton) { performSegueWithIdentifier(\