UIToolBar pinned to bottom of the safe area broken on iPhone X

Originator:pietrorea
Number:rdar://35633289 Date Originated:2017-11-18
Status:Duplicate/34404165 Resolved:
Product:iOS + SDK Product Version:iOS 11.1 (15B87)
Classification:Bug Reproducible:Always
 
On an iPhone X, when you add a standalone UIToolBar to a view controller and add a constraint from the bottom of the UIToolBar to the bottom of the its view controller's safe area, the bar button items appear outside the UIToolBar. It works perfectly on an iPhone 8.

Steps to Reproduce:
1) In a storyboard file, add a UIToolbar to the initial view controller.
2) Add three constraints: trailing to the safe area's trailing edge, leading to the safe area's leading edge, and a constraint going from the bottom of the UIToolbar to the bottom of the view controller's safe area.
3) Build and run on an iPhone X.

Expected Results:
- The UIToolBar looks the same as if it had been the tool bar of a UIToolBarController.

Actual Results:
- The bar button items in the UIToolbar appear above and outside the enclosing toolbar.

Version 
iOS 11.1 (15B87)

Configuration
iPhone X

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!