Orientation UIDEVICE

Hello everyone, I have my own splash screen, which I want to show in landscape mode and on any other screen in potrait mode. My root view controller acts like a splash screen. I am writing this code in viewdidload mode.

[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; 

But this code does not work and shows me that the UIdevice may not respond to setorentation, please explain to me how I can change the view only for the first splash screen, and also the other screen should be in potrait mode.

+2
source share
2 answers

UIDeviceOrientation , UIInterfaceOrientation . , [UIApplication sharedApplication].statusBarOrientation

+8

, ?

"" , , . NO shouldAutorotateToInterfaceOrientation:, , .

: , , , , , , .

, setStatusBarOrientation:animated: UIApplication, .

+2

Source: https://habr.com/ru/post/1612488/


All Articles