Landscape left preview for iPhone X in Interface Builder in Xcode 9 - ios

In Xcode/Interface Builder we have convenient buttons to show our layout with different specific devices like iPhone X, iPhone 8 and so on, and also portrait and landscape. However the only landscape mode available is landscape right. Is there anyway to have IB show our layout in landscape left, so that the notch shows up to the right?

Related

How to rotate an iPhone app when used on an iPad in landscape

Devices is set to "iPhone" under Deployment info. In my Info.plist I have iPhone as Portrait only, and iPad as all 4 options. My app works fine on iPhone (no rotation as expected). It behaves the same on an iPad (no rotation) but of course then to view the app properly I have to hold the iPad like an iPhone with the Home button at the button. I don't want to have to do that. What I want is when the iPad is in landscape, e.g. with a keyboard, for the app to rotate but maintain its iPhone-like appearance, smaller, in the center of the display. How to achieve this?

Move a UILabel when changing to landscape

I have a very simple iOS App (Xcode 8, SWIFT 3), containing a UILabel. It appears some way down the screen when in portrait orientation (Regular, Compact) when using Interface Builder for iPhone 6s. When I rotate to Landscape (Compact, Compact), I cannot get any combination of layouts to move this control to the right-hand half of the landscape view. There is plenty of room for it, but I just cannot work out how to achieve it. I just want it (and a few other controls) to appear in a different place when in Landscape view.

Launchscreen rotation not working on iPhone 6s and smaller screens

I have a launchscreen storyboard with an ImageView and two labels all with some constraints to align the objects relative to the size of the screen.
When i choose a device with a screensize of an iPhone 6s or smaller in the simulator and rotate the device in landscape mode the view is not rotated.
When selecting an device with a larger screensize, e.g. an iPhone 6S Plus, the launchscreen is rotated correctly in landscape mode. Also when running it on an iPhone 6 the launchscreen is not rotated.
Any suggestions how to resolve this?
Maybe got a little bit closer to the cause. When rotating an iPhone 6 Plus or larger to the left in the Simulator, the dock icons are rotated. These are not rotated when rotating a device with a screen size equal or smaller than the iPhone 6.
I do not believe it is possible to rotate the LaunchScreen.
On the Apple Developer site: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/ in the section on "Handling View Rotations" there was this line:
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.
So it looks like your main storyboard will get invoked before orientation can be taken into account.

How to disable portrait orientation for Ipad in swift 2 and xcode 7

I have been having this issue with the layout orientations specifically with ipads. In xcode, I clicked on the project itself in the left panel and disabled portrait layout. This worked for iphones and ipods but not ipads. The application is run on any ipad, the portrait mode is enabled. When turned to the portrait orientation in an ipad, my layout gets squished together and looks very bad. Is there anyway I would be able to only allow the devise orientation to be landscape on every device?
Here is a screenshot of the settings I have

How to Horizontally Center View in Landscape orientation?

I have an app that was originally written for iPhone 4s landscape mode (480x320) but when I run this in iPhone 5 simulator I see that my app is aligned to the left and there's alot of blank space to the right of it. (vertically, it looks/stretches properly)
I was hoping my app would atleast be centered in landscape mode in iPhone5, any ideas?
Also, I have another app that is in portrait mode (320x480) and in iPhone 5 is does vertically center my app properly. So is this just a problem with landscape?
Found it in Size Inspector -> "AutoResizing".
Just had to align the red box correctly

Resources