我放置了两个分段UIButtons
,分别说UIButton
1和UIButton
2。在UIButton
1中,它显示UICollectionView
,没有视频视图。在UIButton
2中,我正在其中显示视频视图。我无法全屏播放视频。
(从全屏选项退出时,我的UICollectionView
Y值已更改)
if self.titleLabel.text == "RECIPES" {
self.alertView.isHidden = true
let layout = orderCollection.collectionViewLayout as? UICollectionViewFlowLayout
let recipeCell = collectionView.dequeueReusableCell(withReuseIdentifier: "recipeVideoCell", for: indexPath) as! recipeVideoCell
if videoView.isHidden == true {
self.recipeSegment.isHidden = false
self.orderCollection.frame.origin.y = 180.0
recipeCell.recipeBook.kf.setImage(array[indexPath.row].media_thumb!))
recipeCell.bookName.text = videoBookArray[indexPath.row].title
} else {
self.recipeSegment.isHidden = false
self.orderCollection.frame.origin.y = 390.0
let url = URL(string: VIDEOURL HERE)
let player = AVPlayer(url:url!)
let av = AVPlayerViewController()
av.player = player
av.view.frame = self.videoView.bounds
self.videoView.addSubview(av.view)
player.play()
}
return recipeCell
}
return cellB
}