Last active
August 29, 2015 14:25
-
-
Save collindonnell/b89f00eebc19975a2a67 to your computer and use it in GitHub Desktop.
UITableView Extension to Deselect Currently Selected Row
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
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