Почему ячейка требует двойного нажатия в UICollectionView?

У меня есть 2 UICollectionView на разных контроллерах, которые заполняю фотками. Код для этих collection view идентичный (в сторибордах тоже все одинаковое), но почему-то на одном контроллере collection view обрабатывает нажатие на ячейку, а на другом контроллере приходится делать долгое или двойное нажатие на ячейку, чтобы обработалось нажатие. Пробовал дебажить, ничего не нашел. Также collection view не перекрывают другие view. В чем может быть проблема?

func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
    return images.count
}

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    
    let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "searchingCell", for: indexPath) as! SearchingCollectionViewCell
    cell.configure(stringUrl: images[indexPath.row].fullUrl)
    
    return cell
}

func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        collectionView.deselectItem(at: indexPath, animated: true)
        
        let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
        guard let viewController = storyboard.instantiateViewController(withIdentifier:  "DetailImageViewController") as? DetailImageViewController else { return }
        viewController.modalPresentationStyle = .fullScreen
        viewController.wallpaperImage = self?.images[indexPath.row]
        
        self?.present(viewController, animated: true, completion: nil)
}

func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
    let frameCollectionView = collectionView.frame
    let cellWidth = frameCollectionView.width / CGFloat(countCells)
    let cellHeight = CGFloat(250)
    
    return CGSize(width: cellWidth - offsetCells, height: cellHeight - offsetCells)
}

Ответы (0 шт):