I’ve encountered with the problem when I don’t need UITableView to reload its cells when I scroll it upwards and downwards. In simple words i created custom cell’s which have content that user can expand by clicking on it. For example I have a UILabel with a lot of text in it which doesn’t display fully but user can click on button and expand text and consequently a label. All this I implement via [tableview beginUpdates] and [tableview endUpdates]. But when I click button and expand text or image and scroll down to other cells and then up UITableView of course reload my cell’s content and text is hiding again but cell remains the same size and this looks ugly. Can I in some way customise UITableView recycling mechanism or update internal cell cache?
I’ve encountered with the problem when I don’t need UITableView to reload its cells
Share
You cant disable the reloading. The proper solution is to ensure you are saving the state of each cell (expanded or not) so when the cell needs to be reloaded due to scrolling, you provide the proper height and content for the current state.