In iOS 6 you have Unwinding Segue to return to previous view controller.
I am now working with storyboard, to figure that thing. And i am on iOS 5 where i dont have Unwinding Segue.
The picture explains the situation:

In third window (i think its officially called story) there is a Done button.
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.
What i did was to implement IBOutlet in ThirdWindowViewController (lets call it that), which is linked to IBAction method.
@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;
EDIT_01
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.
Thanks guys.
You want to set a delegate property in the ‘story’ view controller for the presenting view controller:
NotesViewController.m
Story.m
also make sure to
#import "NotesViewController.h"inStory.h