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