I have application using Landscape orientation only. I have set Device orientation to "Landscape Left" only in project properties. Every controller has Orientation set to Landscape too.
In IOS emulator works all right, width of screen is greater than height, views frames and bounds are as shown. No matter if I run "iPad 2", "iPad Air" and IOS 7 or 8.
If I run it on physically iPad Air, all dimensions are switched as if they are in Portrait mode. Bounds, frames, screen sizes are switched as if begin of screen is top right.
I'd like to do something to say to iPad rotate screen dimensions. I can do some workarounds, but it has another side effect, witch I cannot change. I'm using animation:
UIView.animateWithDuration(0.75, animations: {
UIView.setAnimationCurve(UIViewAnimationCurve.EaseInOut);
self.navigationController?.pushViewController(vc, animated:false);
UIView.setAnimationTransition(UIViewAnimationTransition.CurlUp, forView: self.navigationController!.view, cache: false);
} );
In simulator runs CurlUp perfectly (from right bottom corner to top left), but on iPad animates from bottom left to top right.
Do you have any simple solution, please?
The issue solved itself. I have got a new device, iPad 3 > iPad Air 2 and issue doesn't appear here : )
Related
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?
I'm working with media queries for iPhone. I noticed that when I flip my phone from PORTRAIT to LANDSCAPE, everything gets bigger.
For example, the NAV is taller on PORTRAIT. What's really weird, though, is the Inspector says it's the same height for both orientations: 90px.
What the hell is going on?
How can an element that has the same height be bigger on different orientations?
Thanks!
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.
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
I have an iPhone app that I'm optimising for the iPhone 5's 4-inch screen. I also want it to work with iOS 6. I turned off autolayout to get it to work with iOS 6. I want everything in the view to stay the same distance from the bottom of the screen for both screen sizes. How do i do this?