swiftxcode10.3

My storyboard is not edge to edge with the screen


I'm adding an image but it won't go fullscreen with the iPhone XR, it has white space around it

I tried zooming it in and out for refreshing it, but still won't go fullscreen

I expect the image to go fullscreen


Solution

  • It sounds like you've aligned your image to the Safe Area guide rather than the view edge.

    Safe Area guides are inset a bit on iPhone X/XR devices to allow space for the home indicator or the sensor housing (notch). If you want your view to fill the superview, make sure your layout constraints are attached to the superview edge rather than the Safe Area edge.

    To fix this, edit your existing constraint from the storyboard, changing the item from Safe Area to Superview:

    enter image description here