Is there some way to change uitableview cell size according to the click on cell? For example: cell with width 100.0f, on first click cell changes width to 150.0f and for second click cell changes width back to 100.0f. How can I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should be able to index an NSMutableDictionary with NSIndexPath objects. This will let you cache the sizes you want for your clicked TVCells. Then just pull them out at runtime:
Meanwhile in your delegate:
UPDATE: Oh oops, I thought you meant the TVCells to just get bigger and bigger. Yes, just change the floats in my example to bools, and then in height for row return the height based on the bool.