I want to show in the -
(UITableViewCell *)tableView:(UITableView *)atableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
I create at run time uiimage
and uilabel1
and uilabel2
these are show as my array count=5.
these 5 items to be show like this way:
in the 1st row of the table 3items shown.and remained 2 items to be shown in the next now.
this is to work while load the tab开发者_Python百科le view.
then i change the run time array count=7. i try to reload the tableview. in the tableview overlap on the old array count 5 value.
How can i solve this problem ?
please give idea to solve this problem,
It would be easier to understand your question if you provide some code. Are your adding a subview to the cell? If yes, this will probably solve your problem:
if ([cell.contentView subviews]){
for (UIView *subview in [cell.contentView subviews]) {
[subview removeFromSuperview];
}
}
精彩评论