How to extend bottom view colour below the home indicator in iPhone X?

前端 未结 3 504
生来不讨喜
生来不讨喜 2020-12-24 08:41

Please check the attached image. The Viewcontroller\'s view\'s background colour is blue. This colour extends below the status bar and below the home indicator as you can se

3条回答
  •  既然无缘
    2020-12-24 09:08

    In my case I wanted the view at the bottom to have a height of 49. So set the top to be 49 above the bottom layout guide.

    Then set the view bottom to the superview bottom.

    Now on iPhone X the view extends to the bottom of the phone, and is still has a height of 49 above the safe area, and on other devices the view has a height of 49.

提交回复
热议问题