iPad application always opens in portrait mode - cocoa-touch

The app uses a UISplitView and it always opens in portrait mode. If the iPad is held horizontally it will open in portrait mode and then rotate to landscape. I'd like it to just open up in landscape mode without needing to rotate. Any ideas>

In Info.plist, set UIInterfaceOrientation to UIInterfaceOrientationLandscapeRight (or Left). See the Information Property List Key Reference for more details including how to have different orientations for iPhone versus iPad.

Related

Xcode 6 custom launch screen

I am trying to make a custom launch screen based Xcode 6 new feature following the content given here. I don't understand how can I manage orientation of launch screen on iPad. My launch screen contains a horizontal rectangular image in the centre. Using size classes I can set different constraints and views for iPhone in landscape or portrait mode. But unable to do the same for iPad. Also how can I lock the orientation of Launch screen when creating a launch screen using the above method ?
You can not do this for the iPad because both orientations fall under the regular width and regular height size class.

lock a view to launch initially in landscape (ONLY landscape) objective-C

I want to initially launch one of the View controllers in JUST landscape mode, while the other views and the whole app can work in both portrait and landscape. How can I do it in iOS 7? Thank you.
So your whole app may supports all orientations but one view controller needs to be landscape only.
You can easily stop your landscape view controller to rotate from landscape to portrait but when the app is in portrait already then it is difficult to force the deivce to rotate as this contradicts the iPhone manufacturers priciple.
In fact, it is not really difficult when you know the trick. See my answer to this similar question.
Force controllers to Change their orientation in Either Portrait or Landscape

banner location iOS 7

I'm struggling to make banner ads work properly in my iOS 7 app for the iPad.
Per the Apple Developer's guide, I
1)linked the iAd Framework,
2)imported the iAd header to my controller.h file, and
3) enabled canDisplayBannerAds = YES in the controller.m file.
When I run either (in simulator or on iPad), it displays the banners properly at the bottom of the screen in portrait mode.
However, when I turn to landscape mode, it displays the banners along the left side of the screen, as if it were portrait mode. I cannot seem to figure out how to make it display along the bottom of the screen in landscape mode?

iOS app starts in landscape mode

I have a strange problem. My app keeps starting in landscape mode. If I open it in simulator it rotates to landscape mode automatically. When I start it on iPhone it firstly starts in landscape mode and then shortly after it rotates to correct position. I have set "Initial interface orientation" in .plist to portrait, but that changed nothing.
I had the same problem. If you go to your Supported Interface Orientations you'll see
Item 0 ...
Item 1 ...
And so on.
If you edit this list so that Portrait (bottom home button) is the first item in the list then your app will open in portrait mode. You can still support other orientations as items 1 thru 3.
go to your supported device orientations and check if you have portrait mode selected
if you only support Landscape, write code
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
it work for me.
In XCode 6.4, I just unchecked all 4 of the device orientations and reselected them starting with portrait in the Deployment Info for the Target app. Apparently the order that they are checked here controls the order of the values in the plist file.

Start iPad application both in landscape and portrait mode

Right now when I start my iPad application, if I'm turning my device in landscape mode then my rootConroller automatically turns my table from portrait to landscape mode. The problem is that it does so by animating the transition. Instead I would like the app to start in landscape mode right away. I've also created an image called Default-Landscape.png which is ignored, so I suspect I have to tweak something in the plist file?
Set your orientation to UISupportedInterfaceOrientations in the Info.plist file