I checked the questions here on stack overflow and i do it in the same way but still returns NULL
In the first view
in the firstviewcontroller.h i have
@property (nonatomic, copy) NSString *Astring;
in the firstviewcontroller.m
#import "SecondViewController.h"
...
@synthesize Astring = _Astring;
...
- (IBAction)filterSearch:(id)sender {
NSlog(@"%@",Astring)
}
in the secondviewcontroller.m
#import firstviewcontroller.h
...
...
FirstViewController *controller = [[FirstViewController alloc]initWithNibName:@"FirstViewController" bundle:nil];
controller.Astring = @"YES";
So basicly i make a variable in the firstviewcontroller and pass in the secondviewcontroller the variable to second view,but it returns NULL always...
Is my logic wrong or is it something else