Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
NSIndexPath *selectedRowIndexPath = [self.tableView indexPathForSelectedRow];
if (selectedRowIndexPath) {
[self.transitionCoordination animateAlongsideTransitionInView:self.tableView animation:^(id<UIViewControllerTransitionCoordinatorContext> context) {
[self.tableView deselectRowAtIndexPath:selectedRowIndexPath animated:YES];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
if (context.isCancelled) {
[self.tableView selectRowAtIndexPath:selectedRowIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
}
}];
}
}

self.transitionCoordination -> self.transitionCoordinator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment