Please look to the following code.
FirstViewController.h:
@interface FirstViewController : UIViewController {
NSString* inputData;
}
@property (nonatomic, copy/retain) NSString* inputData;
FirstViewController.m:
@synthesize inputData;
SecondViewController.m:
- (IBAction)buttonSaveDown {
[firstViewController setInputData:@"Text"];
firstViewController.inputData = @"Text";
firstViewController.inputData = [[NSString stringWithString:@"Text"] retain];
}
Add breakpoints after every line with inputData. Check firstViewController.inputData - it's '(null)'! Why?
Printing description of inputData:
(null)
Also I try 'Edit value' in the debugger. After setting value the result is '(null)' too.
There's no any warnings on the build. Please help anybody. Thanks a lot!
To moderators: Sorry, but someone deleted the same previous question when I asked to delete all comments on it.