I have created an app with many views and I want to have some of them only in portrait orientation. I have coded this in .m file:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return NO;
}
Do I need to do something else? May be in .h file?
Cleanest solution for me:
Go to Info.plist file and for the "Supported interface orientations", remove every value except "Portrait (bottom home button)".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With