0

我想在动画完成时重新加载 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.
}

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

4

1 回答 1

1

也许你可以试试:

[tblView performSelector:@selector(reloadData) withObject:nil afterDelay:0.3];
于 2013-07-12T05:41:24.270 回答