0

I would like to animate collectionView Cell like here:

https://d13yacurqjgara.cloudfront.net/users/147165/screenshots/2232500/duolingo3.gif

I think they used here CollectionView.

        collectionView.contentInset = UIEdgeInsetsMake(0, (self.view.frame.size.width - 300)/2, 0, (self.view.frame.size.width - 440)/2);

    UIView.transitionWithView(collectionView, duration: 1.0, options: UIViewAnimationOptions.CurveEaseIn, animations: { () -> Void in

        cell.frame.size.height = self.view.frame.size.height - 200
    cell.frame.size.width = self.view.frame.size.width - 100
    }, completion: nil)

I have size transition but look different. I try to make this animation in cellForItemAtIndexPath.

Maselko
  • 4,028
  • 2
  • 22
  • 21
  • I'm sure that they implemented a custom transition. You can read about it here: https://www.objc.io/issues/12-animations/custom-container-view-controller-transitions/ – almas Oct 20 '15 at 06:02
  • If its true... I have another problem. How to add few boxes like in this animation. – Maselko Oct 20 '15 at 06:07
  • I found similar problem here: http://stackoverflow.com/questions/28025433/android-sliding-items-horizontal-like-in-duolingo-app Can someone translate it to objc or swift? – Maselko Oct 20 '15 at 06:15
  • Why don't you try to translate it yourself, and then let us know if you have any difficulties? – almas Oct 20 '15 at 06:25
  • I'm trying but its hard to understand. – Maselko Oct 20 '15 at 06:27
  • link is broken. – drewster Aug 13 '18 at 14:41

0 Answers0