iPhone - UILabel containing text with multiple fonts at the same time
问题 I am looking for a way to use a UILabel (or something similar) to display something like this: Tom: Some message. It is like how it's done in for example the Facebook app to display the "what's on your mind?" messages. Does anyone have any suggestions how to approach this? 回答1: Use two UILabel IBOutlets, each with a different format (font/color/etc), as you desire.. Move the second one over the first based on where the first one's text ends. You can get that via sizeWithFont:forWidth