5
Ich möchte die Größenanpassung einer UICollectionViewCell animieren. Ich habe den folgenden Code geschrieben, kann aber nicht die return
Zeile im Animationsblock haben. Irgendwelche Ideen?Animate UICollectionView sizeForItemAtIndexPath (Swift)
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
var newSize = CGSize(width: (self.view.frame.width), height: 0)
UIView.animateWithDuration(2.0, animations: {() -> Void in
return newSize
})
}