Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIDEVICE orientation

hello all i have my splash screen which i want to show in landscape mode and all other screen in potrait mode. My root view controller is acting as a splash screen i am writing this code in viewdidload method

[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; 

But this code is not working and shows me that UIdevice may not respond to setorentation please guide me that how could i change the orentation for only first splash screen and also other screen should be in potrait mode

like image 861
hardik Avatar asked Nov 25 '25 21:11

hardik


1 Answers

UIDeviceOrientation refers to the physical orientation of the device whereas UIInterfaceOrientation refers to the orientation of the user interface. You can't change the physical orientation of the device, but you can change how the status bar is displayed via [UIApplication sharedApplication].statusBarOrientation

like image 196
rpetrich Avatar answered Nov 28 '25 17:11

rpetrich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!