I'm trying to duplicate the look and feel of the Mobile Safari toolbar. As you know, the normal toolbar is too short, so I changed it like this:
[topToolbar setFrame:CGRectMake(0.0, 0.0, 320.0, 57.0)];
and this makes it about as wide as I need, however... now my UITextField is right in the middle instead of being at the bottom like it is in Mobile Safari:

VS.

I've tried what feels like a million things (changing the frame, the insets...) and nothing works. Any ideas?
The toolbar will force the items to be centered vertically. However, this is easily overcome by wrapping your UITextFieldin a UIView container aligned to the bottom of the container. Make the UIView the same height as the toolbar. Adding the container to the toolbar will result in the container being centered and the textField aligned along the bottom.
You could create a custom view that has the label and text field and then use the UIBarButtonItem initWithCustomView: method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With