Вопрос

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.

Это было полезно?

Решение

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{

    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

Use this method to support only portrait mode

Другие советы

Return YES for any orientations you support from this function.

 (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{
   return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top