how to convert [Any]
Array to NSArray
, because I want to use
Why are you converting [Any]
to NSArray
when you can use reversed()
with your [Any]
? In Swift it's better to use a native Array instead of NSArray
.
for item in keysStoreBySize.reversed() {
}
If you still want to use NSArray
then you can use the NSArray
initializer init(array:).
let array = NSArray(array: keysStoreBySize) //Will convert [Any] to NSArray