Skip to content

Instantly share code, notes, and snippets.

@aqubi
Created June 1, 2020 15:39
Show Gist options
  • Save aqubi/317a9a68793372106be9279cb98b2941 to your computer and use it in GitHub Desktop.
Save aqubi/317a9a68793372106be9279cb98b2941 to your computer and use it in GitHub Desktop.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if let split = splitViewController, split.isCollapsed {
if let indexPath = tableView.indexPathForSelectedRow {
tableView.deselectRow(at: indexPath, animated: true)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment