我想在动画结束时重新加载tableView。

这是我的代码

  -(void)btnEditClicked{
    toolbar.hidden=!toolbar.hidden;
    editToolbar.hidden=!editToolbar.hidden;
    if (!tblView.editing) {
        [arrSelectedRows removeAllObjects];
        [tblView setEditing:YES animated:YES];
        self.navigationItem.rightBarButtonItem = [Utility setRightBarButtonItemWithTarget:self withAction:@selector(btnEditClicked) andWithImage:@"done_btn.png"];
    }
    else{
        self.navigationItem.rightBarButtonItem = [Utility setRightBarButtonItemWithTarget:self withAction:@selector(btnEditClicked) andWithImage:@"edit_btn.png"];
        [tblView setEditing:NO animated:YES];
    }
   // [tblView reloadData]; if i use this line then the animation not working.
}


那么在完成动画之后是否有任何方法可以调用?
请帮忙

最佳答案

也许您可以尝试:

[tblView performSelector:@selector(reloadData) withObject:nil afterDelay:0.3];

关于ios - 用动画编辑后重新加载tableView吗?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17607392/

10-10 20:46