updating value of modal view variable
<p>I'm trying to make a modal view which displays the champion of my app.
there's a NSMutableString variable called champ in modal view,
which is supposed to be updated by returnChamp function in main view.
the champ string is correctly set in main view,
but in modal view, the champ value appears as (null).
In fact, it seems it doesn't even go into the returnChamp function.
so apparently something wrong with my calling or implementing returnChamp,
but I have another function that does the similar, and that works fine.</p>

<p>could anyone please help me?</p>

<pre><code>-(void) mainView{
.....
        champ = [[currentPlayers objectAtIndex:playerIndex] retain];
        NSLog(@"%@",champ);
        modalWinner = [[winner alloc] init];
        modalWinner.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
        [self presentModalViewController:modalWinner animated:YES];
</code></pre>

<p>}</p>

<pre><code>- (NSMutableString *) returnChamp{
NSLog(@"returnChamp");
return champ;
</code></pre>

<p>}</p>

<pre><code>//in modalWinner
-(void) modalView{
..............


champName = [[NSMutableString alloc] init];
NSLog(@"%@", [(MainViewController *)self.parentViewController returnChamp]);
champName = [(MainViewController *)self.parentViewController returnChamp];
UIImage *champImage = [UIImage imageNamed:champName];
}
</code></pre>
