I am making an IOS app and I use swift. I have an array that I need in order to retrieve data from my CoreData database.
var myList : Array<AnyObject> = []
This "myList" array has an item called "Monday". I want to get the index of this item. I tried to use this to get the index, but it doesn't work.
find(daysOfWeek, "c")!
It gives me an error 'Genetic Paramater cannot be bound to non-@object protocol 'AnyObject''
This find method works fine for normal arrays like this:
var daysOfWeek = ["Monday", "Tuesday"]
How can I get the index of an item for my myList array?