0

In our app we are sorting an NSArray in ascending order by using its first_name key. In Swift 2.3 We have used code like this

let descriptor: NSSortDescriptor = NSSortDescriptor(key: "first_name", ascending: true)
self.ArrayDetails = self.ArrayDetails.sortedArray(using: [descriptor])

Now We Are Migrating Code To Swift 3. And We Getting Error Like

'sortedArray' produces '[Any]', not the expected contextual result type 'NSArray'
Nikunj Damani
  • 753
  • 3
  • 11
Kavin Kumar Arumugam
  • 1,792
  • 3
  • 28
  • 47

0 Answers0