Search code examples
iosuibarbuttonitemuitoolbar

Center bar buttons in toolbar in Xcode


I have two buttons inside of a toolbar that is positioned at the bottom of the screen. I would like to center those buttons within the toolbar. Everything I have found is focused on centering buttons within a nav bar and I am unsure of how to approach this issue. What am I missing?

enter image description here

This is the UI I am attempting to emulate:

enter image description here


Solution

  • Adding a flexible space to the left and right of the buttons centered the buttons inside of the toolbar. Thanks to Midhun MP for the tip.