2

I have started using Safe Area after iPhone X with AutoLayout.

Now I want to draw a view from bottom of screen to all other screens and for iPhone X from bottom of safe area.

I have been using self.view.frame.size.height but it creates below safe area because of the obvious reason.

How can I get the safe area ending point so that I can draw the view inside Safe area?

Edit: I am not creating Safe Area Programmatically.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Hassy
  • 5,068
  • 5
  • 38
  • 63

1 Answers1

6

It seems by using self.view.safeAreaInsets.bottom and self.view.safeAreaInsets.top I was able to address my problem.

Hassy
  • 5,068
  • 5
  • 38
  • 63