I'm trying to switch back from my UIViewController to my UITableViewController but apperendly it's not working the way I want it to.
I did create my Interface with storyboards from the start, so I'm not really into moving from one View to another by code. Until now, I just pushed my Views per sergues which are easy to implement with storyboards. But when I tried moving back to my previous Views, a new ViewController will be implemented, so all my data I stored in the old one is "lost".
Actually there is no code I could present you (because of the sergues) but the situation is:
->I got an MutableArray storing stuff in my UITableView.
->User taps the scan Button, scans a new Item which should be imported in my array.
->When trying to push back to my tableView there's a new Controller awating me, unaware of the data I stored in the old one.
So how do I simply move back to my old Controller preventing to create a new one all the time?
Does a sergue-push always creates a new Controller?
(Question may be simple, but I'm new to this stuff. Tried some results presented by the search function, but none of them worked :( )
/edit: Popback problem has been solved but array filling problem still exists. Code:
GeneralSettings *sharedGS = [GeneralSettings sharedInstance];
sharedGS.strEAN = [[NSString alloc] initWithString:strCheckString];
[sharedGS.listArray insertObject:strCheckString atIndex:0];
NSLog(@"Anzahl der EAN-Codes: %d
Erster Code: %@
In Variable: %@", sharedGS.listArray.count, [sharedGS.listArray objectAtIndex:0],sharedGS.strEAN);
Data in sharedGS.strEAN ("83274572354" i.e.)
Data in listArray (null)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…