Example #1
0
        protected virtual void SetupCollectionView(UICollectionView collectionView)
        {
            collectionView.ChangeFrame(0, 0, DeviceInfo.ScreenWidth, DeviceInfo.ScreenWidth);

            (collectionView.CollectionViewLayout as UICollectionViewFlowLayout).ItemSize = new CGSize(DeviceInfo.ScreenWidth, DeviceInfo.ScreenWidth);

            collectionView.PagingEnabled = true;
            collectionView.ShowsHorizontalScrollIndicator = false;

            collectionView.RegisterNibForCell(ImageCollectionCell.Nib, ImageCollectionCell.Key);
        }
        protected virtual void SetupCollectionView(UICollectionView collectionView)
        {
            collectionView.ChangeFrame(0, 0, DeviceInfo.ScreenWidth, DeviceInfo.ScreenWidth);

            var layout = new CardsCollectionViewLayout
            {
                ItemSize                = new CGSize(DeviceInfo.ScreenWidth - 32, DeviceInfo.ScreenWidth - 32),
                ScrollDirection         = UICollectionViewScrollDirection.Horizontal,
                MinimumInteritemSpacing = 8
            };

            collectionView.CollectionViewLayout = layout;

            collectionView.PagingEnabled = true;
            collectionView.ShowsHorizontalScrollIndicator = false;

            collectionView.RegisterNibForCell(ImageCollectionCell.Nib, ImageCollectionCell.Key);
        }