Rowan Freeman
Rowan Freeman

Reputation: 16388

If iPhone landscape is wCompact-hCompact, why does it look so wrong?

I've created a single-view calculator app and I'm practising with different layouts for different device orientations.

I'm modifying wAny-hCompact and wAny-hRegular. I've got a stackview for my C, CE and buttons. I've set the stackview to be vertical normally, but for regular height to be horizontal. This looks great.

The Stackview:

stackview-attributes

wAny-hCompact:

wAny-hCompact

wAny-hRegular:

wAny-hRegular

Problem

The problem is that when I run my application in the emulator it looks wrong. I've tried iPhone 5s, iPhone 6 and iPhone 6s. They all have the same problem.

According to my source these devices are

So why does it look like this? Why does it look correct in Xcode but not in an emulator?

Why do the iPhone emulators think that they are regular height in landscape?

Note: There are no errors or warnings in my app. I have only the minimum constraints to make it work and the constraints are completely separated to the two different base orientation types (wAny-hCompact and wAny-hRegular).

iPhone 6 Portrait (correct)

iphone-portrait

iPhone 6 Landscape (wrong)

iphone-landscape

Upvotes: 0

Views: 34

Answers (1)

Rowan Freeman
Rowan Freeman

Reputation: 16388

I have solved this problem. Here's how:

  1. Grab the C, CE and stack view and move it somewhere else within the view (anywhere)
  2. Updates Frames

Although everything looked identical, when I re-ran the application, everything looked correct even when in landscape. I guess it was bugged or glitched somehow.

Upvotes: 0

Related Questions