Link to home
Start Free TrialLog in
Avatar of PatrickK_W
PatrickK_WFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Dynamically resize single cell in UITableview with multiple static cells

Hi, I have a UITableView with static cells of varying heights. I have set the heights in IB.

I have one cell that shows/hides a UITextView depending on which option is selected by the user. When the UITextView is visible I would like the cell to become higher, and when it is not visible I would like the cell to be smaller.

I know how to use the heightForRowAtIndexPath method, but I only want to change the SPECIFIC cells height in here.

if I implement it I will need to return a height for EVERY cell. ther are about 15 static cells all with varying heights.

is there any way around having to keep a list of each cells height and return it from heightForRowAtIndexPath?
SOLUTION
Avatar of KRUNAL TAILOR
KRUNAL TAILOR

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PatrickK_W

ASKER

Hi Krunal, is there a way of getting the cell sizes for the other cells as defined in IB at run time in heightForRowAtIndexPath?

if not I'd have to define each cells size in heightForRowAtIndexPath... not the most elegant of solutions, but workable.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial