UICollectionViewCell のサイズ変更をアニメーション化したいと思います。以下のコードを書きましたがreturn
、アニメーション ブロック内に行を含めることができません。何か案は?
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
})
}