I have a .plist file with root dictionary and loading keys of letters as:
["A": ["AXB", "ACD", "ABC"], ... ]
It would be right by:
["A": ["ABC", "ACD", "AXB"], ... ]
Then, I wanna sort this array's itens of the A index. So, I tried do thus:
class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
var musicalGroups : NSDictionary = NSDictionary()
var keysOfMusicalGroups : NSMutableArray = NSMutableArray()
override func viewDidLoad() {
super.viewDidLoad()
let bundle = Bundle.main
let path = bundle.path(forResource: "bandas", ofType: "plist")
musicalGroups = NSDictionary(contentsOfFile: path!)!
keysOfMusicalGroups = NSMutableArray(array: musicalGroups.allKeys)
keysOfMusicalGroups.sort(using: NSSelectorFromString("compare:"))
}
And I got just the keys of Dictionary sorted using keysOfMusicalGroups.sort code
Any help will be appreciated. Thanks in advance!

NSArray,NSDictionary, etc., instead of their Swift counterparts?