Devo creare un UITableViewCell
che contenga un sacco di testo. So che posso aggiungere uno UITextView
alla mia cella, ma ciascuna voce non avrà la stessa quantità di testo.UITableViewCell, UITextView con altezza dinamica
So che posso controllare l'altezza del UITableViewCell
con: -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
, ma questo non è proprio quello che sto cercando.
Scenario 1:
---------------
| First Cell |
---------------
---------------
| Second Cell |
| with some |
| text. |
---------------
---------------
| Third Cell |
---------------
Scenario 2:
---------------
| First Cell |
---------------
---------------
| Second Cell |
| with some |
| more text and |
| an unknown |
| cell height. |
---------------
---------------
| Third Cell |
---------------
non è chiaro cosa si sta cercando, - (CGFloat) tableView: (UITableView *) tableView heightForRowAtIndexPath: (NSIndexPath *) indexPath è il metodo standard per farlo. –
Sì, ma quando non si conosce l'altezza della cella in anticipo, non ha senso. – WrightsCS