I have two View Controllers
. First one have sendbutton
that segue to second view controller. Action Segue
is Show
. Each time click the button, new window pops up again. I don't want create new window again, and I just want to only one second View Controller
.
And my FirstViewController.m
:
- (void)prepareForSegue:(NSStoryboardSegue*)segue sender:(id)sender{
SecondViewController *destinationScene = [segue destinationController];
destinationScene.receivedString = _nextOne.stringValue;
}
SecondViewController.m
:
- (void)viewWillAppear{
if(_myMutableArray == nil) _myMutableArray = [NSMutableArray array];
[_myMutableArray addObject:_receivedString];
}
What I want to is send a string in the first View Controller
's TextField
repeatedly to next View Controller
. And keep using only one second window that created at first time.