Created
February 20, 2017 13:41
-
-
Save Marcocanc/8c35f1299ea4501838dcf795a11c863e to your computer and use it in GitHub Desktop.
deselect any UITableViewRow that may be selected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UITableView { | |
//deselect any row that may be selected | |
public func deselectAnyRow(animated: Bool = true) { | |
if let indexPath = self.indexPathForSelectedRow { | |
self.deselectRow(at: indexPath, animated: animated) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment