I have text that is built from two Strings: A(B)
I want to use both strings as the title for the UINavigationItem but in case of truncation I want only A to be truncated and not B.
Example: The title I want is "The quick brown fox jumps (over the lazy dog)". The screen size is too small so the title truncates and it is now "The quick brown fox jumps (over...".
What I want it to be is: "The quick br... (over the lazy dog)"
How can I do that?
First check number of characters navigation bar allowing as title without truncating. Next, before setting title check whether the total string length is less than those number of characters or not. Now based on condition set either combined string or B only.