I am working on a UILabel
which features large main text followed by smaller text that tells you who said it:
Right now it is basically an NSAttributedString
with a font attribute on the small text.
I would like to set things up so the big text wraps but the small text doesn't. I.e., If the text will all fit on the same line as it does in the right item, it should render as is, but it it would wrap like in the left item, the whole of the small text should appear on the next line:
The HTML equivalent of what I'm trying to achieve is:
Title <nobr>Subtitle</nobr>
- or -
Title <span style="white-space:nowrap">Subtitle</span>
I've tried converting both of these to NSAttributedStrings with NSHTMLTextDocumentType
and it doesn't appear to do a direct translation.