title: How to use delegate methods to pass objects between two view controllers?
body: <p>I'm using the Utility Application project to Xcode 4.2, then I am adding two text fields for each view: <code>main view</code> and the <code>flipside view</code>.
  Now I wish to assign the value of the <code>flipside</code> text field to mainview text field.</p>
  
  <p><strong>MainViewController.h</strong></p>
  
  <pre><code>      #import "FlipsideViewController.h"
  
        @interface MainViewController : UIViewController &lt;FlipsideViewControllerDelegate&gt;  {
          UITextField *nameField;
        }
        @property(nonatomic, retain) IBOutlet UITextField *nameField;
  
        - (IBAction)showInfo:(id)sender;
  
        @end
  </code></pre>
  
  <p><strong>FlipsideViewController.h</strong></p>
  
  <pre><code>      @class FlipsideViewController;
  
        @protocol FlipsideViewControllerDelegate
           - (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller;
        @end
  
        @interface FlipsideViewController : UIViewController {
            UITextField *changeText;
        }
        @property (nonatomic, retain) IBOutlet UITextField *changeText;
        @property (assign, nonatomic) IBOutlet id &lt;FlipsideViewControllerDelegate&gt; delegate;
  
        - (IBAction)done:(id)sender;
  
        @end
  </code></pre>
  
  <p><strong>FlipsideViewController.m</strong></p>
  
  <pre><code>      #import "FlipsideViewController.h"
  
        @implementation FlipsideViewController
  
        @synthesize delegate = _delegate;
        @synthesize changeText;
  
        - (IBAction)done:(id)sender
        { 
          [self.delegate flipsideViewControllerDidFinish:self];
        }
  </code></pre>
  
  <p>When the done action starts, i want the <code>changetext</code> value be assigned to <code>nameField</code> text.
  How do I do this?</p>