title: set value textfield from another viewcontroller
body: <p>i edited my question , because set textfield maybe can't be simple, need references so this is my code, but still have issue :</p>
  
  <p>this code for TableViewController :</p>
  
  <pre><code>import UIKit
  
  protocol PaymentSelectionDelegate{
  func userDidSelectPayment(title: NSString?)
  }
  
  class PopPaymentTableViewController: UITableViewController {
  
      var delegate : PaymentSelectionDelegate!
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
      }   
  
     override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath?) {
  
      self.dismissViewControllerAnimated(true){
          if self.delegate != nil{
              if let ip = indexPath{
                  var payItem : PayMethod
  
                  payItem = self.myList[ip.row] as! PayMethod
  
                  var title = payItem.paymentName
  
                 self.delegate.userDidSelectPayment(title)
                 }
             }
         }
     }
  
  
  }
  </code></pre>
  
  <p>and for code TransactionViewController :</p>
  
  <pre><code> import UIKit
  
   class TransactionViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate, PaymentSelectionDelegate, UITextFieldDelegate, UIPopoverPresentationControllerDelegate{
  
   @IBOutlet var paymentTextField: UITextField!
  
   override func viewDidLoad() {
      super.viewDidLoad()
   }
  
  
      func resign(){
  
          paymentTextField.resignFirstResponder()
     } 
  
    func textFieldShouldBeginEditing(textField: UITextField) -&gt; Bool {
         if (textField == paymentTextField){
          resign()
  
          performSegueWithIdentifier("seguePayment", sender: self)
         }
    }
  
    func adaptivePresentationStyleForPresentationController(controller: UIPresentationController) -&gt; UIModalPresentationStyle {
      return .None
    }
  
  
    func userDidSelectPayment(title: NSString?) {
      paymentTextField.text = title as! String
    }
  
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
  
      if segue.identifier == "seguePayment"{
  
          var VC = segue.destinationViewController as! UINavigationController
  
          var controller  = VC.popoverPresentationController
  
          if controller != nil{
              controller?.delegate = self
  
              var paymentVC = PopPaymentTableViewController()
              paymentVC.delegate = self
          }
      }
  
  }
  
  
  }
  </code></pre>
  
  <p>this issue is: variable delegate in TableViewController like seems always nil, so cant set value</p>
  
  <p>NB : sorry i edited totally my question, because so many answer say cant be set textfield just like that</p>