How can I tell When a UITableView animation has finished?

前端 未结 3 750
生来不讨喜
生来不讨喜 2020-12-09 17:08

How can I tell when [UITableView setEditing:YES animated:YES] has completed?

I don\'t want to give any context, because I want to avoid anybody giving me workarounds

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 17:57

    In iOS 4 you can do the following:

    [UIView animateWithDuration:0.3f
                     animations:^{
                         [self.tableView setEditing:YES animated:NO];
                     } 
                     completion:^(BOOL finished){
                         // Do something
                     }
    ];
    

提交回复
热议问题