用动画编辑后重新加载tableView?

时间:2013-07-12 04:21:55

标签: ios objective-c uitableview

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

所有在完成结束后调用的方法是什么? 请帮忙

1 个答案:

答案 0 :(得分:1)

也许你可以试试:

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