ios - Shrink boundaries on UITableView cell label -


I am populating a UITableView with data from an array, however, while displaying some parts of the data, Many rooms are available with the text, or very similar text to fix it, although I will move the cell to the right of the title, and fill the parent title with the title on the left side of the cell. There is not enough room in the cell for both titles, so I wanted to wrap text for both text labels and expansion text labels, hoping that each label would occupy half of the cell. So I did this:

  cell.textLabel.text = parentItem.title; [Cell.textLabel setLineBreakMode: NSLineBreakByWordWrapping]; Cell.textLabel.numberOfLines = 2; Cell.detailTextLabel.text = item.title; [Cell.detailTextLabel setLineBreakMode: NSLineBreakByWordWrapping]; Cell.detailTextLabel.numberOfLines = 2;  

However, instead of sharing the space in the label, the text label (one on the left) is spread all over the place, the only way is to replace the detail text label If the text label breaks before a big word, and leaves some space at the end of the line, how do I get my two labels to share space equally?


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -