Skip to content

Instantly share code, notes, and snippets.

@sleimanzublidi
Last active October 5, 2017 18:34
Show Gist options
  • Save sleimanzublidi/9f14f99a88f108974e28643d38b2ef0e to your computer and use it in GitHub Desktop.
Save sleimanzublidi/9f14f99a88f108974e28643d38b2ef0e to your computer and use it in GitHub Desktop.
Animate UICollectionView
UIView.TransitionNotify(
this.CollectionView,
duration: 0.5,
options: UIViewAnimationOptions.TransitionCrossDissolve,
animation: delegate { },
completion: delegate { });
var frame = this.CollectionView.Frame;
var newFrame = new CGRect(frame.Location, frame.Size);
newFrame.Y = newFrame.Height;
this.CollectionView.Frame = newFrame;
this.ReloadAllCards();
UIView.TransitionNotify(
this.CollectionView,
duration: 0.5,
options: UIViewAnimationOptions.CurveEaseOut,
animation: delegate
{
this.CollectionView.ReloadData();
this.CollectionView.Frame = frame;
},
completion: delegate { });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment