2013-07-12 59 views
0

我想在動畫完成時重新加載tableView。用動畫編輯後重新加載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完成後調用任何方法? 請幫助

回答

1

也許你可以試試:

[tblView performSelector:@selector(reloadData) withObject:nil afterDelay:0.3]; 
相關問題