Pregunta

I have set my iPad app to Landscape mode using following code..

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    } else {
        if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
            return NO;
        }
        return YES;
    }
}

When i manually rotate the simulator then it will go in Landscape and never goes in Portrait mode.

Just during Startup my app goes in Portrait mode.

How can i detect the Landscape mode only or How should i set to only Landscape mode???

I tried from BuildSettings too but unable to solve problem...

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top