I am trying to find an item index by searching a list. Does anybody know how to do that?
item index
list
I see there is list.StartIndex and <
list.StartIndex
SWIFT 4
Let's say you want to store a number from the array called cardButtons into cardNumber, you can do it this way:
let cardNumber = cardButtons.index(of: sender)
sender is the name of your button