Question

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.

Était-ce utile?

La solution

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{

    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

Use this method to support only portrait mode

Autres conseils

Return YES for any orientations you support from this function.

 (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{
   return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top