Adjust width of UITextField to fill toolbar in landscape
问题 In a UIToolbar , I have added a UITextField to the middle of the bar (which gets added as a UIBarButtonItem ) with another UIBarButtonItem (Action button) next to it. I added flexible space bar button items at the very left and very right. It looks great on portrait, but when I rotate to landscape it centers them and looks ok, but I need the text field to get stretched to fill the width and push the last button clear to the right - exactly like it does in Messages - on iPhone and iPad. I