I have a UItableView with cells. Each cell has a button. How to do that when I click on the button cell's height increased?
Asked
Active
Viewed 42 times
-1
-
follow up this http://stackoverflow.com/a/21984749/675170 – Vijay-Apple-Dev.blogspot.com Apr 30 '14 at 06:22
1 Answers
1
Do something like this:
#pragma mark - Table View
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
Item *object = listData[indexPath.row];
if (object.buttonClicked) {
return 300;
}else{
return 100;
}
}

Sergey Neskoromny
- 1,188
- 8
- 15
-
How does this change the row's height when a button is tapped in the cell? – rmaddy Apr 30 '14 at 06:27
-
1
-
And do not forget to save the state of your button on each row! – Sergey Neskoromny Apr 30 '14 at 06:31