two views orientation problem
<p>I am new to iphone development.. </p>

<p>am creating one small application where two viewcontrollers like</p>

<ol>
<li>loginController  </li>
<li>updateController</li>
</ol>

<p>For apply orientation i created two views for each controller like
for 
first controller these are 'landscapeLoginView' &amp; 'portraitLoginView' 
&amp; for second these are 'landscapeUpdateView' &amp; 'portraitUpdateView'</p>

<p>I define 'isLogin' variable in MainControllerDelegate file,</p>

<p>Code for orientation is as given below,  </p>

<pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

TestAppDelegate *testDelegate = (TestAppDelegate *)[[UIApplication sharedApplication] delegate];

if(testDelegate.isLogin) {
    UpdateController *updateController = [[UpdateController alloc] initWithNibName:@"UpdateController" bundle:nil];
    [self.view addSubview:updateController.view];
    [updateController release];
    return YES;
} else 
{
    if(UIInterfaceOrientationIsPortrait(interfaceOrientation))
    {
        self.view = self.portrait;
    }
    else if (UIInterfaceOrientationIsLandscape(interfaceOrientation))
    {
        self.view = self.landscape;
    }
    return YES;
} 
</code></pre>

<p>}</p>

<p>This will load the respected orientation after clicking on 'Login' button.
Everything work fine for 'LoginController' like button events &amp; all.</p>

<p>but,
when i entered on 'UpdateConroller' and update text from TextView by clicking 'Update'button, it's updated for 'PortraitView' not for 'LandscapeView'.</p>

<p>In Interface Builder i set 'PortraitView' to 'view'.</p>

<p>How can i achive same functionality for 'LandscapeView'? Am i doing right? </p>
