dimanche 28 juin 2015

After tableview reload cell not deleted

I have one UIView and inside one table view.After reload data visible cell remains and overlapping another cell in table view.I am using pull to refresh control and using reloadRowsAtIndexPaths.

[self.tableView beginUpdates];
[self.tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationNone];
[self.tableView endUpdates];

If I put something like this :

 if(indexPath.row >5){

                                             [self.tableView beginUpdates];
                                             [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
                                             [self.tableView endUpdates];
                                         }
                                         else {

                                             [self.tableView reloadData];


                                         }

In this scenario there is no overlapping but this is not best solution.

Aucun commentaire:

Enregistrer un commentaire