Beginning Auto Layout - Part 2: Section 1: | Ray Wenderlich

Autoresizing is the predecessor to Auto Layout. It's simpler, and sometimes, effective! Dive into the "mask of flexibilities"!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4538-beginning-auto-layout/lessons/2

Iโ€™m following this tutorial exactly for setting up the background image to work on multiple devices and device orientations. Yet Iโ€™m getting different results in the iPhone X preview in the Assistant Editor (see attached). What am I doing wrong? Am using Xcode 9.0.

Thanks!
-geoff

Check the Content Mode setting for the background image (on the Attribute inspector). Have you by any chance set it to Aspect Fit rather than Aspect Fill? What you need is Aspect Fill since then the image resizes to fit the entire area while still maintaining its aspect ratio.

Update: Actually, while that setting would explain the landscape display, it would not explain how the portrait images look in your screenshot. So that might not be it - but Iโ€™d start by checking the Content Mode. But if thatโ€™s not it, perhaps post a link to your project (on DropBox or something similar) so that anybody interested can take a look at what is going on for all the settings?