title: iOS Handling the UIBarButtonItem the way of Unwinding Segue
body: <p>In iOS 6 you have Unwinding Segue to return to previous view controller.</p>
  
  <p>I am now working with storyboard, to figure that thing. And i am on iOS 5 where i dont have Unwinding Segue.</p>
  
  <p>The picture explains the situation:
  <img src="https://i.stack.imgur.com/ZuUYl.png" alt="enter image description here"></p>
  
  <p>In third window (i think its officially called story) there is a Done button. </p>
  
  <p>How to make that button return an object with text on screen and return to window 2?
  There, i window 2 the table should refries, but that is out of the scope of this question.</p>
  
  <p>What i did was to implement IBOutlet in ThirdWindowViewController (lets call it that), which is linked to IBAction method.</p>
  
  <pre><code>@property (nonatomic, strong) IBOutlet UITextView* textView;
  
  @property (nonatomic, strong) Note* note;
  
  @property (nonatomic, retain) IBOutlet UIBarButtonItem* doneButton;
  
  - (void) configureView;
  - (IBAction) doneAction:(id)sender;
  - (BOOL) prepareNoteForTransition;
  </code></pre>
  
  <p>EDIT_01</p>
  
  <p>As Tom wrote, you need a delegate. That is the way i actually did it, with methods i put above. I just thought that there is some more apple-specific way to do it, like that Segues. or some alternatives.</p>
  
  <p>Thanks guys.</p>