Andrea Lk
Andrea Lk

Reputation: 377

Why my Xcode interface builder show red block and failed to render

Problem

I have a Controller in Storyboard which has a long UIScrollView inside. Previously it shows perfectly in Interface Builder and now I haven't changed the code. The last time I knew that I updated Xcode to version 11.0. I don't quite know why it fails to render, is it some issue in Xcode 11?

If I compiled, it's success with 0 error and some warning (Which seems me to some Swift deprecated). Even it shows perfectly in Compiled App. I have tried:

  1. Clean Build
  2. Delete Derived Data
  3. Reopen Xcode
  4. Rebuild
  5. Restart OS

Some failed render screenshot

Edited after some experiment

Okay, so I tried a bunch of things again and I think I narrowed some problem (maybe?). So my layout show perfectly in iPhone 11 preview, but it fail to render in iPhone 11 Pro Max, iPhone 11 Pro and iPhone 8 Plus preview. Is it ringing any bell?

iPhone 11 screenshot: iPhone 11 screenshot

iPhone 11 Pro Max screenshot: iPhone 11 Pro Max screenshot

iPhone 8 Plus screenshot: iPhone 8 Plus

Upvotes: 1

Views: 276

Answers (1)

Mr_P
Mr_P

Reputation: 543

Obviously a change in storyboard previews in Xcode. Seems like it's no longer acceptable to show "simulated size: freeform" greater than iPhone screen height. Changing it to "simulated size: fixed" in Size Inspector solves the issue, and you can now scroll from within the reduced size window in storyboards view...

Upvotes: 1

Related Questions