Frage

Hi im createing a iOS application and i would like it to run on portrait all the time even when i turn it left/right i want it to stay the same here some images of all the settings relevant to portrait.

enter image description here

enter image description here

enter image description here

so thats all the stuff I've set so my question is how do i keep in in portrait even when i tilt it at the moment when it runs it opens in portrait but say if i turn it left it will rotate to landscape.

thanks in advance i will look forward to here from you.

War es hilfreich?

Lösung

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{

    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

Use this method to support only portrait mode

Andere Tipps

Return YES for any orientations you support from this function.

 (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{
   return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top