I've a navigationcontroller. In my secondview, i want to have a button, that when is tapped, go to the first viewController and set a text there.
So, in my button (secondView) I have:
SearchViewController *svc=[[SearchViewController alloc]init];
[svc setValueMethod:@"randomString"];
[self.navigationController popToRootViewControllerAnimated:YES];
In my firtView:
-(void)setValueMethod:(NSString *)myPassedString
{
_searchField.text = myPassedString;
}
But the _searchField now is null. But when you first enter on the app it works, ok and you can make _searchField.text = @"aString"; that work. But after popping from the secondView it get's null!
Can someone help me with that?