Accessing a view controller's function/variable from other view controllers
<p>I'm currently making the initial menu view controller, which sets up the setting for main game view controller..</p>

<p>so in my menu game controller, I have</p>

<pre><code>#import "MainGameViewController.h"
@implementation menuViewcontroller

 ......

-(void)setting{
NSMutableDictionary *regions =
[(MainGaimViewController *)self.delegate regions];
NSNumber *yesBool = [NSNumber numberWithBool:YES];
NSNumber *noBool = [NSNumber numberWithBool:NO];
[regions setValue:yesBool forKey:@"KM"];
[regions setValue:noBool forKey:@"KF"];
}
</code></pre>

<p>but this gives me the "Request for member 'delegate' in something not a structure or union</p>

<p>regions is a NSMutableDictionary in main game view controller.
so I think menuViewController is not being able to access the function/variable in main game view controller despite the import.
currently, I haven't declared "class MainGameViewController" in my menu implementation file. Could that be why? should I make an object of maingameviewcontroller and use it?</p>

<p>What could be wrong?
Please help me out..</p>
