Get value from Modal View in Swift iOS
问题 i'm trying to start writing Swift and i'm trying to get a value from a modal view controller with no luck. I have two controllers, the ViewController and modalViewController. In ViewController i have a UITableView and with a press of a button i open the modalViewController. Then from a UITextField i pass the value. I have implement a protocol with delegate and func but somewhere i'm missing something or had it wrong. ViewController.swift import UIKit class ViewController: UIViewController