Created
August 20, 2015 08:34
-
-
Save cybertk/2befc00818c1ea6227fc to your computer and use it in GitHub Desktop.
Revisions
-
cybertk created this gist
Aug 20, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ // // UITableView+ClearSelections.swift // Cybertk // // Created by Quanlong He on 8/20/15. // Copyright © 2015 Quanlong He. All rights reserved. // import Foundation extension UITableView { // Clear all selections func clearSelections(animated: Bool) { if let indexPaths = self.indexPathsForSelectedRows { for indexPath in indexPaths { self.deselectRowAtIndexPath(indexPath, animated: animated) } } } }