I have a problem similar to this question but more complex. I'm trying to draw text in a table view cell which has a date label top right and a badge bottom right, like so:
+-----------------------+----+
| Lorem ipsum dolor sit |DATE|
| amet, consectetur +----+
| adipiscing elit. Integer |
| ligula lectus, convallis |
| non scelerisque +-----+
| quis, tempor at nibh |BADGE|
+----------------------+-----+
I want the cell to be larger or smaller if there is more or less text:
+-----------------------+----+
| Lorem ipsum dolor sit |DATE|
| amet, consectetur +----+
| adipiscing elit. Integer |
| ligula lectus, convallis |
| non scelerisque quis, |
| tempor at nibh. Curabitur |
| eget diam ligula. |
| Pellentesque a elit |
| dolor, a ullamcorper +-----+
| risus. |BADGE|
+----------------------+-----+
The answer to the older question links to a project which shows how to flow text around known shapes. But I don't know the shape in advance, as I need the badge to align with the bottom of the text.
Is this even possible? If so, how do I draw the text, and how do I work out how tall it will be?