Skip to content

Instantly share code, notes, and snippets.

@collindonnell
Last active August 29, 2015 14:25
Show Gist options
  • Save collindonnell/b89f00eebc19975a2a67 to your computer and use it in GitHub Desktop.
Save collindonnell/b89f00eebc19975a2a67 to your computer and use it in GitHub Desktop.
UITableView Extension to Deselect Currently Selected Row
import UIKit
public extension UITableView {
public func deselectSelectedRowAnimated(animated: Bool) {
if let indexPath = indexPathForSelectedRow() {
deselectRowAtIndexPath(indexPath, animated: animated)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment