swift NSComparator
var cmptr:NSComparator = {(obj1:AnyObject!, obj2:AnyObject!) -> NSComparisonResult in if((obj1["sort"] as! NSString).integerValue > (obj2["sort"] as! NSString).integerValue) { return NSComparisonResult.OrderedDescending } if((obj1["sort"] as! NSString).integerValue < (obj2["sort"] as! NSString).integerValue) { return NSComparisonResult.OrderedAscending } return NSComparisonResult.OrderedSame }