With the introduction of Xcode 6, Apple removed the ability to easily have multiple storyboards for iPad and iPhone in Universal apps. Due to this, you cannot differentiate between iPad and iPhone on the rotation panel/settings.
How can i stop the iPhone app from Rotating into landscape, while still allowing the iPad app to do so.
Is it something you can only do in code? If it is, I am still using Objective C, not Swift.
Swipe down from the top-right corner of your screen to open Control Center. Tap the Portrait Orientation Lock button to make sure that it's off.
On an iPhone with a Home button, swipe up from the bottom of the screen to access it. On an iPhone without a Home button, swipe down from the top-right corner of the screen instead. Here, tap on the rotation lock icon (which looks like a lock with a circular arrow) to turn it on or off.
To disable Screen Rotation Lock, unlock your iPhone so that you're on the home screen and swipe down from the top right of your screen to reveal the Control Center. 2. Locate the icon featuring a small lock with an arrow curving around it. If Screen Rotation Lock is active, this will appear highlighted.
Remove all the other answers' code. Go to your info.plist file and add the following.
Check out THIS answer.
Basically you'd have to implement Chris1994's answer on a UINavigationController or UITabBarController subclass and then add the following to the first UIVIewController subclass you have on that Nav or Tab Controller :
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
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