簡體   English   中英

用動畫編輯后重新加載tableView嗎?

[英]reload tableView after editing with animation?

我想在動畫結束時重新加載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];

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM