ios - Sorting an array with AnyObjects in Swift -


I have a code that is being extracted from a dictionary with .allKeys and I I want to sort it by using the function such as sorted () function

  function (s1: Int, s2: int) - & gt; Bull {Return s1 & lt; S2} array = sorted (dictionary.allKeys, order)  

However, type .allKeys yields AnyObject and I get an error since I int < Code> order () function. Any ideas?

  sir array = AllKeys.sorted () {(Int $ 0) & lt; ($ 1 as the Internet)}  

is more concise and it should work properly


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -