Is there a way to change the UITableCell height when a button is pressed? I’m trying to make the tablecell height changed to follow the label height, let say if the word is too lengthy, and it take 20 lines, the tablecell height will be roughly 21 line height, and if I pressed a segmented button, it’ll have 50 lines words, and the tablecell height will change into roughly 51 height. Is there a way to do this? Thanx in advance.
Share
I think you could look into UITableViewDelegate and provide the method:
UITableViewcalls this function each time that it has to redraw a row. So, if you set some internal variable of yourUITableViewControllerwhen you click your button, and makeheightForRowAtIndexPath:return the height depending on this value, you should get it right.