Open safetylab opened 8 years ago
Same Here...Xcode 7.3.1
You can fix this error by splitting the expression and casting each subscript to appropriate type, like this:
let array = cellDescriptors[indexPath.section] as! NSArray
let dict = array[indexOfVisibleRows] as! NSDictionary
Here dict
is your dictionary of type (String: AnyObject)
Swift is a strongly typed language and that is why you are getting this error
When I try to add your example in my code I have
let cellDescriptor = cellDescriptors[indexPath.section][indexOfVisibleRow] as! [String: AnyObject]
Ambiguous use of 'subscript'
How can I fix this?