0

I want to remove safe area margin for all my view controller views. I have tried the below code but it is not working. I dont know how to remove the safe area margin.

public override UIEdgeInsets AdditionalSafeAreaInsets { get => base.AdditionalSafeAreaInsets; set => base.AdditionalSafeAreaInsets = value; }

AdditionalSafeAreaInsets = new UIEdgeInsets(0,0,0,0);

and unchecked the Safe Area Relative margin in Storyboard. But the safe area is not removed. Please give your suggestion to remove the safe area margin.

image screenshot

Layout Image

DotNetUser
  • 415
  • 3
  • 18

1 Answers1

0

Try the following steps:

  1. Open storyboard and check Safe area autolayout guides true.
  2. After doing this give superview's top bottom left right constraints to Safe Area instead of layout margin.
  3. So superview will fit inside the safe area in all iOS devices.

enter image description here

Anees Deen
  • 1,385
  • 2
  • 17
  • 31