Move UIBarButtonItems vertically to a UIToolBar

I am trying to duplicate the look of the Mobile Safari toolbar. As you know, the regular toolbar is too short, so I changed it as follows:

[topToolbar setFrame:CGRectMake(0.0, 0.0, 320.0, 57.0)];

and that makes it about as wide as I need ... now my UITextField is right in the middle, not the bottom, like in Mobile Safari:

My app

VS.

Mobile safari

I tried what seems like a million things (changing the frame, inserting ...) and nothing works. Any ideas?

+3
source share
2 answers

. , UITextField UIView, . UIView , . , , textField .

+5

, initWithCustomView: UIBarButtonItem.

+1

All Articles