I have a custom UIToolbar that I show when the tab bar is hidden. The toolbar buttons are too close to the home indicator on the iPhone X:
let toolbar = UIToolbar() let height = tabBarController?.tabBar.frame.height toolbar.frame = CGRect(x: 0, y: view.bounds.height - height, width: view.bounds.width, height: height) toolbar.autoresizingMask = [.flexibleWidth, .flexibleTopMargin] view.addSubview(toolbar)
Buttons too close to home indicator 

This is what I want it to look like (Mail app) ^
Since this is a custom view, I know that I can change the y position and move it to start at the bottom of the safe area, but I would rather move the buttons. I use a simple UIBarButtonItem with flexible space in between.
source share