When I pass a string to another view I have a null values. My code is:
In view AddBarView.m
, where I have the string:
nameAdded = nameField.text; //nameAdded is defined as NSString in AddBarView.h
NSLog(@"namefrom addbarview: %@", nameAdded); OK it works here , NsLog return the textfild
Now in other view AddLocationController.m
@synthesize nameAdded;
- (void)addViewControllerDidFinish:(AddBarView *)controller
{
AddBarView *controllerAdd;
NSLog(@"namefrom addbarview: %@", controller.nameAdded); //here
[self dismissModalViewControllerAnimated:YES];
}
the NSLog
return a (null) value. Where is my fault?
tx in advance!