In my UITableViewCell
of UITableViewCellStyleSubtitle
I want to fill the complete maximum width of detailTextLabel
; one short text on the left (left-aligned) and another short text at the far right (right-aligned). The two texts will leave enough space between them.
I found this but that does not seem to work; it simply adds a fixed space between the left and right part.
If the detailTextLabel
had a fixed width spreading the full available cell space, it wouldn't be that hard: The width of both strings could be calculated and the remaining space filled using NSKernAttributeName
for example. But, unfortunately detailTextLabel
is dynamically adjusted for the current content.
Has anyone figured out an elegant solution to do this? (Other than in small steps making the text longer and longer until it hits the full potential width of detailTextLabel
and snaps back a little because of the ...
.)