How to catch an animation end in deleteRowsAtIndexPaths
I believe that wrapping your table update in animateWithDuration
would work:
[UIView animateWithDuration:0.0 animations:^{
[coursesTable beginUpdates];
…
[coursesTable endUpdates];
} completion:^(BOOL finished) {
// Code to run when table updates are complete.
}];
Other methods that I found suggested here on Stack Overflow did not work for me.
I used this technique at one time and tested it enough to verify that the completion block was called after I called the table's endUpdates method and the time that it was called seemed reasonable, but I rewrote my code so I didn't need it any more before I had completely verified that the animation was actually finished.