Search code examples
iosswiftxcodeimagexcode-storyboard

Images In Xcode Storyboard Randomly Get Distorted


I am new to swift/xcode/iOS development. I've created a project in xcode and I'm having the weirdest bug affect me. When I launch xcode, the storyboard images appear to be distorted. I can close xcode, re-launch and sometimes they will be fine and sometimes they will not be fine. What would cause these images to distort? When I run the app both on a device and simulator the images are fine and have no issues at all. Why only on the storyboard do these images get distorted?

Storyboard View

View Controller View

EDIT: The possible duplicate question is about question marks displaying whereas in my Xcode it is about the images being distorted. I came across that answer while searching but since they said it was question marks I didn't think it was related to me. Anyone now searching for distorted images will come across this question and find the right info. Thanks to all


Solution

  • It loads in the original image, because you have no "screen scale" showing the @2x or @3x image . When you run it in the device, it loads the correct @2x or @3x depending on the device scale.