Попробуйте этот код для масштабирования Cell и вид передачи .. EventlistCollection мой CollectionView ..
var extraview : UIView = UIView()
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath){
self.animateZoomforCell(DemoCollectionview.cellForItemAtIndexPath(indexPath)!)
extraview = UIView.init(frame: CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height))
extraview.backgroundColor = UIColor.clearColor()
extraview.addSubview(DemoCollectionview.cellForItemAtIndexPath(indexPath)!)
self.view.addSubview(extraview)
}
func animateZoomforCell(zoomCell: UICollectionViewCell) {
UIView.animateWithDuration(0.5, delay: 0, options: .CurveEaseOut, animations: {() -> Void in
let x = zoomCell.frame.size.width/2
let y = zoomCell.frame.size.height/1.5
zoomCell.transform = CGAffineTransformMakeScale(x, y)
}, completion: {(finished: Bool) -> Void in
self.animateZoomforCellremove(zoomCell)
})
}
func animateZoomforCellremove(zoomCell: UICollectionViewCell) {
UIView.animateWithDuration(0.5, delay: 0, options: .CurveEaseOut, animations: {() -> Void in
zoomCell.transform = CGAffineTransformMakeScale(1.0, 1.0)
}, completion: {(finished: Bool) -> Void in
self.extraview.removeFromSuperview()
self.DemoCollectionview.reloadData()
})
}
Этот код поможет вам, пожалуйста, дайте мне голосовать. Спасибо.
У вас нет демо? –