2017-05-26 95 views
0

我从Webservice调用中获取数据。当我从服务器第一次获取数据时UITableView单元格数据是好的,但是当我滚动表格视图然后数据被重新创建。TableView单元格数据覆盖

这是什么解决方案?

+1

请把一些代码 –

+0

试着让你的问题更清楚了解,添加一些代码 – D4ttatraya

回答

0
 check if cell is nil, as following 

    static NSString *CellIdentifier = @"id"; 

    YourCreatedCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 

    if(cell == nil){ 

     NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"YourCreatedCell" owner:self options:nil]; 

     cell = [nib objectAtIndex:0]; 


     }