title: Xamarin.Forms and iOS: how to combine UseSafeArea and a background image?
body: <p>I've a question about the use of <strong>safe area</strong> for iOS.</p>
  
  <p>I use a <strong>background image</strong> through a <code>RelativeLayout</code>, and I display a <strong>form</strong> on this background image. I use a <code>margin</code> for iOS on the form's container: this works fine, but the render on a <strong>iPhone X</strong> is not very nice.</p>
  
  <pre><code>&lt;RelativeLayout&gt;
  
      &lt;Image Source="background.jpg" Opacity="0.75"
             Aspect="AspectFill"
             RelativeLayout.WidthConstraint =
                 "{ConstraintExpression Type=RelativeToParent, Property=Width}"
             RelativeLayout.HeightConstraint =
                 "{ConstraintExpression Type=RelativeToParent, Property=Height}" /&gt;
  
      &lt;ScrollView RelativeLayout.WidthConstraint =
                      "{ConstraintExpression Type=RelativeToParent, Property=Width}"
                   RelativeLayout.HeightConstraint =
                      "{ConstraintExpression Type=RelativeToParent, Property=Height}"&gt;    
      &lt;ScrollView.Margin&gt;                
          &lt;OnPlatform x:TypeArguments="Thickness"&gt;
              &lt;On Platform="iOS" Value="0, 20, 0, 0" /&gt;
          &lt;/OnPlatform&gt;
      &lt;/ScrollView.Margin&gt;
  
      &lt;StackLayout&gt;
          &lt;!-- Header --&gt;
          &lt;StackLayout VerticalOptions="Start"&gt;
              &lt;fnc:HunterHeader /&gt;
          &lt;/StackLayout&gt;
  
          &lt;!-- Form --&gt;
          &lt;StackLayout VerticalOptions="CenterAndExpand"
                       Spacing="6" Margin="20"&gt;
              &lt;!-- ... --&gt;
          &lt;/StackLayout&gt;
      &lt;/StackLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>So I've tried to set the <code>UseSafeArea</code> to <strong>true</strong>, but I got top and bottom margins. </p>
  
  <p><strong><em>Is it possible to fix this, and to combine UseSafeArea and a background image?
  Or is there a way to add specific margin for the iPhone X only?</em></strong> </p>