To get the index of a specific item in an array in Swift, use the array.firstIndex(where:) method. E.g. [1,2,3].firstIndex(where: {$0 == 2})
確定! 回上一頁