Note that there are some explanatory texts on larger screens.

plurals
  1. POMoving back from a Controller to a previous one
    primarykey
    data
    text
    <p>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".</p> <p>Actually there is no code I could present you (because of the sergues) but the situation is:</p> <p>->I got an MutableArray storing stuff in my UITableView.</p> <p>->User taps the scan Button, scans a new Item which should be imported in my array.</p> <p>->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.</p> <p>So how do I simply move back to my old Controller preventing to create a new one all the time?</p> <p>Does a sergue-push always creates a new Controller?</p> <p>(Question may be simple, but I'm new to this stuff. Tried some results presented by the search function, but none of them worked :( )</p> <p>/edit: Popback problem has been solved but array filling problem still exists. Code:</p> <pre><code>GeneralSettings *sharedGS = [GeneralSettings sharedInstance]; sharedGS.strEAN = [[NSString alloc] initWithString:strCheckString]; [sharedGS.listArray insertObject:strCheckString atIndex:0]; NSLog(@"Anzahl der EAN-Codes: %d\nErster Code: %@\n In Variable: %@", sharedGS.listArray.count, [sharedGS.listArray objectAtIndex:0],sharedGS.strEAN); </code></pre> <p>Data in sharedGS.strEAN ("83274572354" i.e.) Data in listArray (null)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload