Hi, everyone,
I want to ask a question about the iPhone application. In my program, there are several controller class. However, I dont' know how to handle them and switch the control right between different view controller classes. I read some code from the apple website. Can anyone explain to me? Thank you very much.
// I create a view controller called 'MyViewController'
- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSLog(@"applicationDidFinishLaunching");
MyViewController *aViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:[NSBundle mainBundle]]; // what meaning of this statement
[self setMyViewController:aViewController]; // can I set in other class
[aViewController release];
UIView *controllersView = [myViewController view]; // what is it use?
[window addSubview:controllersView];
// Override point for customization after application launch
[window makeKeyAndVisible];
}