Beispiel #1
0
        public override void ViewWillTransitionToSize(CGSize size, IUIViewControllerTransitionCoordinator coordinator)
        {
            base.ViewWillTransitionToSize(size, coordinator);

            coordinator.AnimateAlongsideTransitionInView(CollectionView, (context) =>
            {
                var isPortrait = size.Height > size.Width;
                var space      = this.PickerConfig.AlbumItemSpace(isPortrait: isPortrait);
                var insets     = this.CollectionView.ContentInset;
                this.CollectionView.ContentInset = new UIEdgeInsets(top: insets.Top, left: space, bottom: insets.Bottom, right: space);
                this.UpdateLayout(layout: this.CollectionView.CollectionViewLayout, isPortrait: isPortrait);
            }, (_) => { });
        }