Первый метод переопределения делегата и didSelectItemAt
метод
Чем уже у вас есть список из 60 элементов массива.
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
{
return list.count
}
override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
{
addToList.append(objectsArray[indexPath.row])
let cell = collectionView.cellForItem(at: indexPath)
cell?.layer.borderWidth = 2.0
cell?.layer.borderColor = UIColor.gray.cgColor
}