For first time my UIView always goes in Portrait mode…though i set to Landscape
-
12-11-2019 - |
Pergunta
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...
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow