Created
June 20, 2015 20:02
-
-
Save Daemon-Devarshi/7ea73784219b0dc46f01 to your computer and use it in GitHub Desktop.
Extended NSArrayController in swift
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 NSArrayController { | |
/// Method which can be binded in storyboard to remove all objects from array controller | |
@IBAction func removeAllObjects(sender: AnyObject) { | |
let range = NSMakeRange(0, self.arrangedObjects.count) | |
self.removeObjectsAtArrangedObjectIndexes(NSIndexSet(indexesInRange: range)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment