UIToolbar and Flexable/Fixed bar button items
Asked Answered
R

1

2

I have a toolbar, where I want to have one UIBarButtonItem centered and have another on the very right. However when I add the button on the right, my centered button gets shifted further to the left (see attached). I can't figure out how to get this resolved without using code (I would like to use interface builder only). Any ideas?

Interface Builder toolbar

Regine answered 9/4, 2011 at 18:15 Comment(0)
W
14

To do this in just IB, add a fixed bar button item to the very left of the bar that's the exact same width of the 'switch camera' button, followed by a flexible button, your camera icon, another flexible space, and the switch camera.

So it would look like:

|--fixed space--||--flexible space--||Camera Button||--flexible space--||switch camera|
Warnke answered 9/4, 2011 at 18:20 Comment(1)
That makes perfect sense. Thanks!Regine

© 2022 - 2024 — McMap. All rights reserved.