Passing contents of array from one class to another
<p>I've got an array populating a small tableView in a DetailView class, and when the user presses a button I need the array to be sent to another View Controller, to populate a tableView there, but I'm having some difficulty getting it working. This is what I've been trying to do so far:</p>

<pre><code>*DetailViewController.m*

    #import "DetailViewController.h"
    #import "OtherViewController.h"


-(IBAction) toCart:(id)sender {

    OtherViewController *oVC = [[OtherViewController alloc] init];
    oVC.shoppingList = sList;
    NSLog(@"Ingredients count %d", [sList count]); //This returns a number, so the sList definitely contains values, and the method is definitely being called.
    [oVC release];

}
</code></pre>

<hr>

<pre><code>*OtherViewController.m*

    #import "OtherViewController.h"
    #import "DetailViewController.h"

    @synthesize shoppingList;

-(void) viewWillAppear: (BOOL)animated {
    NSLog(@"list count: %d", [shoppingList count]); // This returns 0

}
</code></pre>

<p>sList is populated elsewhere in the class, and sList and shoppingList are both declared in their respective .h files, with @property (nonatomic, retain)...</p>

<p>Any help much appreciated!</p>
