UICollectionView застрял в последней ячейке при включении подкачки - PullRequest
1 голос
/ 15 марта 2020

У меня есть представление коллекции с включенным подкачкой, но каким-то образом в последней ячейке оно застряло, если я попытался прокрутить вправо Я пытался отключить отскок при прокрутке, но все еще происходит. Это не происходит в xcode 10.3

enter image description here enter image description here

extension ViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return videos.count
    }

    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionview.dequeueReusableCell(withReuseIdentifier: "VideoPlayerCollectionViewCell", for: indexPath) as! VideoPlayerCollectionViewCell
       return cell
    }

    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        return CGSize(width: self.view.frame.width , height: self.view.frame.height)

    }

    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
        return 0
    }
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...