I started a project with PhoneGap in XCode and selected just portrait for orientation. Now my client wants to have booth Landscape and Portait available. Thing is I cant find how to change it back!
Can anyone point me in the right direction? Thanks!
Yup I got it:
Under your project file, click the symbol under Target on the left. Have the Summary tab selected and scroll down to find the orientation options.
Related
Hello maybe someone can help me, I've got an issue with landscape. I've done the auto layout, but when I actually rotate the device the content isn't turning at all. Anyone knows what to do?
Click your project, and go to your iOS target. In the general tab, make sure device orientation is checked for the landscape orientations:
This change should also be reflected in the info.plist file.
Am new to Xcode, using version 8, and have a small game done.
The problem I am facing is that the orientation is in landscape, which I can't get to portrait, in the simulator and on device.
Tried the following :
Changing Device Orientation under Deployment Info to Portrait,
Adding 'Portrait' under Supported interface orientations in the Info.plist file.
Maybe I m missing out on something that I may have overlooked. Could somebody shed some light on this?
Check under General/Deployment Info, There are checkbox options for Portrait, Upside down, Landscape left, landscape right. Make sure your intended options are also ticked appropriately. Also, check your "vary for traits" in your storyboard. There may be some conflict or something. If your game was made in Unity/Unreal, you gotta check the settings there before exporting to iOS format.
Well, just found this out. I am using cocos2D framework, which has the 'startUpOptions' Dictionary object (in AppDelegate.m) that need to be specified if the game needs to be in 'Portrait' mode thus:
[startUpOptions setObject:CCScreenOrientationPortrait forKey:CCSetupScreenOrientation];
I created an app with Swift and tested it out on my iPod touch. The problem is, sometimes I accidentally rotate the screen a little while playing, which throws off everything entirely. Is there a way in Swift to make it so even if the player rotates the device sideways it never turns to landscape mode?
You will want to
Click on the top-left corner (Show the Project Navigator)
Select the name of your project
See what is under General->Deployment Info->Device Orientation.
Adjust the tickboxes accordingly.
Screenshot of Device Orientation in General settings
If you click on your project in top left corner and on the Info tab you can un-tick some of the orientation tick boxes to only allow Portrait.
It's simple.It's not on Swift though.Just swipe up on your ipod and a little tab should come up. Once there,a button with an unlocked lock with an arrow around it.Click it and it should become locked.Now,it won't turn into landscape mode when you turn it! :)
I have just begun creating a new Xcode project, and noticed that how I normally remove the function to have the app in landscape; a tick box under device orientation within the general tab of the project; has disappeared.
Has this orientation setting moved elsewhere, or must I now code it to lock it into portrait only?
Also, I am working in objective-c.
Thanks.
Click on your project on the left menu, next uncheck Landscape mode in Device Orientation:
In my project I have only options "portrait" and "upside down" selected. The two of landscape options are not checked. But when I run it whether on a device or on simulator and turn it right or left the app becomes landscape. It should not, what could be wrong?
Ups, sorry i didn't noticed the iPad tab which also containes checkboxes with checked landscape