How to launch landscape view from portrait in iphone?
<p>Im new to iPhone developer, I have a Login screen in Iphone, when i run, it displayed in half screen only, then i change the orientation it displayed the login screen in landscape mode, but i want when i launched the app it displayed in landscape mode in portrait and navigation to another screen also landscape mode in portrait, how? please any one help me</p>

<pre><code> - (BOOL)shouldAutorotateToInterfaceOrientation:()
 {
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIDeviceOrientationLandscapeLeft ||
         orientation == UIDeviceOrientationLandscapeRight )
{
    return YES;
}  
else if (orientation == UIDeviceOrientationPortrait ||orientation ==    UIDeviceOrientationPortraitUpsideDown)
{ 
    return NO;
}
 }
</code></pre>

<p>Used these code not working in landscape mode in portrait, but i change the orientation it will worked.</p>
