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
Post a Comment