Beispiel #1
0
 private void HideLoader()
 {
     if (_isContentLoaded)
     {
         CollectionView.HideLoader();
         return;
     }
     //_overlay.RemoveFromSuperview();
 }
Beispiel #2
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);
            tabBarView.Hidden = true;
            float inset = (float)(this.CollectionView.ViewForBaselineLayout.Frame.Width / 16); //30.0f;

            CGRect screenRect  = UIScreen.MainScreen.Bounds;
            nfloat screenWidth = screenRect.Size.Width;
            nfloat cellWidth   = (screenWidth - inset * 3.0f) / 2.0f;

            CollectionView.Source = new RewardCollectionSource(this);

            CollectionView.CollectionViewLayout = new UICollectionViewFlowLayout
            {
                ItemSize                = new CGSize(cellWidth, cellWidth),
                ScrollDirection         = UICollectionViewScrollDirection.Vertical,
                SectionInset            = new UIEdgeInsets(inset, inset, inset, inset),
                MinimumInteritemSpacing = inset,
                MinimumLineSpacing      = inset
            };

            ChangeSelectedButton(0);
            CollectionView.CustomRefreshControl.ValueChanged += async(s, e) =>
            {
                if (Platform.IsInternetConnectionAvailable() == true)
                {
                    await SL.Manager.GetRewardsAsync();

                    CollectionView.ReloadData();
                    IsRewardCollectionEmpty();
                }
                CollectionView.HideLoader();
            };

            RefreshAsync();
        }