How to set different color for upper and bottom area which is outside safe area in iPhone X

Viewed 1738

How to set a different color for the upper and bottom area which is an outside safe area in iPhone X i.e for point 1 and point 2 in the image?

If I set the color to main view (point 3) then it gets applied to the whole view. I want to set the different color to an upper area of the safe area, to a safe area and to below bottom safe area.

enter image description here

1 Answers

https://i.stack.imgur.com/0Ut7A.png

add two views and give background color to them. if its not required in other view set hight 0 point of both view.

Related