How do you add an image in the beginning of a multiline开发者_如何学编程 iPhone UILabel so that it starts the first line of text but doesn't disrupt the flow of the second/third/etc line of text?
This cannot be done with a UILabel
. To accomplish this, you're going to have to have the image with a UILabel to the right of it, and another UILabel
below those that spans the full width. And you'll have to calculate how much of the text can be shown in the first UILabel
, so that you know what text to put in the bottom label. UILabel visible part of text should give you an idea of what you'll need to do to calculate how much of the text is visible in the first label.
Not an easy task, but it's doable.
精彩评论