views:

75

answers:

1

I created a View based application in which i want to navigate from one view to another on a button click but i cannot find the right method?? is it only possible in navigation based application?? i tried addsubview method but still not working??

what is the right method to accomplish this??

A: 
- (void) applicationDidFinishLaunching: (UIApplication*) application {
    [_window addSubview: [_firstView view]];
    [_window makeKeyAndVisible];
}

// This method is on AppDelegate   
- (void) navigateToSecondView {
    [[_firstView view] removeFromSuperview];
    [_window addSubview: [_secondView view]];
}

But, you must implement an animation because this raw changes doesn't have a default one.

Espuz