I got an array with objects, and populate the collection view with them. For example I have 3 objects inside my collection view. Is there a way, to receive the current index path based on the object name?
Thanks
I got an array with objects, and populate the collection view with them. For example I have 3 objects inside my collection view. Is there a way, to receive the current index path based on the object name?
Thanks
let indexPath = objects.index(where: {
$0.name == "value"
}).flatMap({
IndexPath(row: $0, section: 0)
})