Why iPhone sill rotate after I uncheck the device orientation (delete rotation from info.plist file) - ios

I don't check any device orientation on the Deployment Info page, that is, there is no entry in the Supported interface orientations on the Info.plist. However, the iPhone still can rotate to landscape. How can I disable iPhone rotation? Do I need to write some code in the view controller? Thanks in advance.

When you don't check any orientation, it defaults to all of them. To keep the orientation at only portrait, you must check the portrait only orientation.

You can toggle here in the device orientation section which orientation that you want your app to support:
Just set it to portrait and you'll be fine.

Related

How to make iOS app orientation portrait only?

How do I make my iOS app Portrait Only? It looks like it's already in portrait mode currently but when I flip my device it rotates still. I am using tableViews and collectionViews within my app, I'm not sure if they would affect these settings or not.
To fix this problem I had to add "Supported interface orientations (iPhone)" and set the item to "Portrait (bottom home button)" in my info.plist file

Is there a way to start iOS app with the initial orientation dynamically?

I know that we can define main orientation in iOS apps. However I couldn't figure out a way to do what I want: If the device is in landscape mode, start the whole application in landscape mode. If not, start it in portrait.
Currently, if I start the application after rotating the device into landscape mode, It opens in portrait mode than it rotates. Is there a way to start the whole app in landscape? (Already rotated window)
Yes; just indicate that you support all device orientations in your info.plist. You can see this in Xcode in your project settings under "General" in Xcode 5.
Quote from Apple's UIViewController documentation:
Note: At launch time, apps should always set up their interface in a portrait orientation. After the application:didFinishLaunchingWithOptions: method returns, the app uses the view controller rotation mechanism described above to rotate the views to the appropriate orientation prior to showing the window.

How to disable Tabris iOS client orientation?

Is there a way to disable Tabris iOS client orientation? Meaning, I would like to fix the application orientation not change it when device orientation change.
Currently there is no Tabris/Java API available ...yet - but it's planned.
To fix the App orientation, click on your Xcode App target, and select only the "Supported Device Orientations" (Options available there: Portrait, Upside Down, Landscape Left, Landscape Right)

shouldAutorotateToInterfaceOrientation gets called but app interface does not reorients (only the status bar reorients)

I am trying to build an app that only works for landscape device orientations on iOS devices. That means my shouldAutorotateToInterfaceOrientation returns true for only landscape device orientations. However at some points of time, I need to switch to portrait device orientation for which I use setStatusBarOrientation API.
After holding the device in any landscape orientation and setting the interface orientation to default/upside down by using setStausBarOrientation API, and just tilting the device slightly in the held orientation orientation only, the status bar rotates but the interface does not rotates. shouldAutorotateToInterfaceOrientation does get called and returns true but still interface does not reorient. Also, problem gets solved if I rotate the device in opposite orientation. I am not sure what I am doing wrong.
Apple have accepted this as a bug in their SDK and they might fix the issue in the next release.

Starting iPad app in current landscape orientation

My ipad app only runs in landscape orientation. But when I test on an actual device (not the simulator) it always seem to start in one particular landscape orientation, then turn 180 degrees to match the current physical landscape orientation. So, it seems to start in LandscapeLeft(I think) then rotate 180 if I have it in LandscapeRight. There's nothing in Info.plist to set the initial orientation.
Can anyone suggest a way to detect current orientation before view loads and set it to correct landscape view before showing?
Thanks
Fitto
There is the UIInterfaceOrientation~iPad key which sets the initial interface orientation on startup.
There is also the UISupportedInterfaceOrientations key which informs the app which orientations are supported.
There is no way, however, to make the app start in the current orientation of the iPad.
Have you looked into these questions?
Get current orientation of iPad?
iPad launch orientation
Also, technically, the iPad should just do it. Make sure you have supported orientations set properly, as I'm sure it checks those to see where it should start.

Resources