Issue #538
Hierarchy
UIToolbar -> _UIToolbarContentView -> _UIButtonBarStackVie
UIToolbarContentView
_UIToolbarContentView's width should equal 0
_UIToolbarContentView's height should equal 0
Workaround that fixes 1 warning
toolbar.setItems(items, animated: false)
toolbar.updateConstraintsIfNeeded()
Set frame explicitly
Use a non .zero
frame that is close to the view bounds width
let toolbar = UIToolbar(frame: CGRect(x: 0, y: 0, width: 375, height: 30))
DispatchQueue.main.async {
self.toolbar.updateConstraintsIfNeeded()
}