Reputation: 16758
I have an array controller which stores managed objects of entity 'Student', I am trying to iterate over its content using below code:
for (index, element) in downloadingFilesArrayController.arrangedObjects{
// want to do some useful things on element
}
for some reasons it is showing compilation error:
'Type AnyObject does not conform to protocol SequenceType'
Any ideas on how can fix it?
Upvotes: 1
Views: 1272
Reputation: 650
You can do something like this:
for element in downloadingFilesArrayController.arrangedObjects as! [AnyObject] {
// want to do some useful things on element
}
Upvotes: 3