Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kevinrichardsuk

macrumors member
Original poster
May 19, 2008
30
0
Hi everyone,

I am creating a program for the iPhone, using some of Apple's sample code. I've bit a brick wall trying to figure out my latest problem.

In my main app delegate (and working fine):

Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {

    UIViewController *aViewController = [[UIViewController alloc] initWithNibName:@"TestTouchView" bundle:[NSBundle mainBundle]];
    self.viewController = aViewController;
    [aViewController release];

    UIView *controllersView = [viewController view];
    [window addSubview:controllersView];
    [window makeKeyAndVisible];
}

My TouchTestView.m file then takes over and creates the layout programatically.

I need to pass an instance message from the delegate to TouchTestView though, and I can't figure out how to do it.. I even tried in desperation sending to both "viewController" and "window" but they won't respond to the message (obviously)..

How can I index my TouchTestView class from the delegate file??

Any help greatly appreciated.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.