0

I'm using Auto Layout/Constraints with Interface Builder in Xcode 6.1, so that my App renders correctly on all iOS devices. It works great across the iPhone 4s/5/5s/6 simulators and a real 5s, but part of the view is cut off when I run it on the iPhone 6 Plus Simulator.

To debug this, I downloaded the AlternateViews example code from Apple, and saw the exact same behavior. Then I tried to write a really simple test App, and saw the same thing again. I noticed that the iPad Air Simulator also cut off part of the view, and when I tested on a real iPad Air, the simulated/real displays did not match. I feel like there is something wrong in my dev setup (not a bug in the iOS Simulator), but I've double-checked everything and even reinstalled Xcode. Please let me know if you've seen this before, or have a recommendation on what to try next. Thanks!

AlternateViews Example on iPhone 6 Simulator: AlternateViews Example on iPhone 6 Simulator

AlternateViews Example on iPhone 6 Plus Simulator: AlternateViews Example on iPhone 6 Plus Simulator

My SimpleTestApp on iPhone 6 Simulator: SimpleTestApp on iPhone 6 Simulator

My SimpleTestApp on iPhone 6 Plus Simulator: SimpleTestApp on iPhone 6 Plus Simulator

My SimpleTestApp on iPad Air Simulator: SimpleTestApp on iPad Air Simulator

My SimpleTestApp on Real iPad Air: SimpleTestApp on Real iPad Air

David M
  • 31
  • 4
  • I have a similar problem. The view is completely misaligned in all iPhone versions. I even tested with a new single view application, just added 'date picker', ran the applications. The date picker is half off cut off. I don't get it. I'm using default settings and did not change anything. When I look at the constraints of the date picker, the width is -16 on either side. – Nikolas Sakic Nov 23 '14 at 04:52
  • 1
    @NikolasSakic That's not the same problem at all. It's just because you didn't add any constraints that position the date picker. The view in the storyboard is wide but the screen is narrow, and you didn't do anything to reposition the date picker when the view gets narrow on the iPhone, so it stays right where it is, sticking off to the right of the now narrow screen. See also my answer here: http://stackoverflow.com/a/26962218/341994 – matt Nov 23 '14 at 19:58

1 Answers1

0

I've seen this offsetting on rotation issue, starting in June 2014 when iOS 8 first went public, and I submitted to Apple a test project that showed how to reproduce it. In most cases it is possible to work around and prevent it, but my test project continued to demonstrate the issue.

A few weeks ago, however, Apple replied to my bug report, asking me to test in iOS 8.2 (available in beta as part of the Xcode 6.2 beta). The issue could no longer be reproduced!

Therefore I would suggest that what you're encountering is, at least in part, a genuine iOS bug, and that iOS 8.2 will prove to have fixed it.

matt
  • 515,959
  • 87
  • 875
  • 1,141