I have a UIBarButtonItem in a UIToolbar that is updated with changes to a title represented by a text field. The text field should not have a short maximum length. When the title is quite long, the item occludes the button items to its right. How can I make it automatically truncate to a certain width?


I have a UIBarButtonItem in a UIToolbar that is updated with changes to a
Share
Use a custom view with maximum possible width,
textAlignmentset toUITextAlignmentCenterandlineBreakModetoUILineBreakModeTailTruncation.