views:

29

answers:

1

Hi,

I tried to add buttons, textboxes and text to tableview. I want the row height to get adjusted automatically according to the height of each ui component. How can i achieve this ?

+2  A: 

You have to return the specific height for each cell in the UITableViewDelegate method

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

It would be best, if you find a way how to calculate the height of your cells dynamically.

schaechtele