ios - multiple Custom cell with identifier - reload table - low memory -
i have uitableview utilize custom cells. in total 5 different type of cell identifier.
i nib file related- customcell .h , .m file. provide several label , images.
in storyborad have created 5 uitableviewcell , subclass customcell.h different identifier. every cell may utilize label or image customcell.h
everytime utilize [self.tableview reloaddata]; create new cell in memorry.
customecell can not dequeue leads low memory , app crash. correct?
every time [self.tableview reloaddata]; called, new cell added memory instead of reusing them. how release older cell?
[update images]
in view controller table view client cell different identifier
one of them below.
tableview row
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { nsstring *identifier = [self calculateidentifier:indexpath.row];// retrun identifier @"labelcell" etc. controlcell *cell = (controlcell *)[tableview dequeuereusablecellwithidentifier:identifier]; cell.questionlabel.text = [self calculateque:indexpath.row]; cell.answerlabel.text = [self calculateans:indexpath.row]; homecoming cell; } ios uitableview memory-management
No comments:
Post a Comment