Skip to content

Instantly share code, notes, and snippets.

@Sorix
Created March 13, 2020 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sorix/ded6fef3542cdc4f3a89215dd78ce985 to your computer and use it in GitHub Desktop.
Save Sorix/ded6fef3542cdc4f3a89215dd78ce985 to your computer and use it in GitHub Desktop.
if let selectedIndexPath = methodsTableView?.indexPathForSelectedRow {
if let coordinator = transitionCoordinator {
coordinator.animate(alongsideTransition: { context in
self.methodsTableView?.deselectRow(at: selectedIndexPath, animated: true)
}) { context in
if context.isCancelled {
self.methodsTableView?.selectRow(at: selectedIndexPath, animated: false, scrollPosition: .none)
}
}
} else {
self.methodsTableView?.deselectRow(at: selectedIndexPath, animated: animated)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment