Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- View_Ciao *viewCiao;
- -(void) viewDidLoad {
- viewCiao = [[View_Ciao alloc] initWithNibName:@"View_Ciao" bundle:nil];
- [viewCiao.view setNeedsDisplay];
- [super viewDidLoad];
- }
- - (void)applicationDidFinishLaunching:(UIApplication *)application {
- [window addSubview:viewController.view];
- [window makeKeyAndVisible];
- // create the second view, remove the first, and then display the second
- viewCiao = [[ViewCiao alloc] init];
- [viewController.view removeFromSuperview];
- [window addSubview:viewCiao.view];
- }
- @interface AppDelegate : ...
- {
- View_Hello *hello;
- View_Goodbye *goodbye;
- View_Ciao *ciao;
- UIViewController *currentView;
- UIWindow *window;
- }
- ... IBOutlet properties for the 3 controllers.
- @end
- @implementation AppDelegate
- - (void)switchToGoodbye
- {
- [currentView.view removeFromSuperview];
- [window addSubview:goodbye.view];
- currentView = goodbye;
- }
- ... etc.
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement