예제 #1
0
        public void IsRewardCollectionEmpty()
        {
            var itemsCount = CollectionView.Source.GetItemsCount(CollectionView, 0);

            if (itemsCount == 0)
            {
                EmptyCollectionView.Hidden = false;

                _swipe = new UISwipeGestureRecognizer();
                _swipe.AddTarget(() => HideAreaCollection());
                _swipe.Direction = UISwipeGestureRecognizerDirection.Up | UISwipeGestureRecognizerDirection.Down;
                EmptyCollectionView.AddGestureRecognizer(_swipe);

                _tap = new UITapGestureRecognizer();
                _tap.AddTarget(() => HideAreaCollection());
                EmptyCollectionView.AddGestureRecognizer(_tap);

                var data  = NSData.FromFile("Images/panda-ohno.gif");
                var image = AnimatedImageView.GetAnimatedImageView(data, ViewForImage);
                ViewForImage.Image = image.Image;
                ViewForImage.StartAnimating();
            }

            if (itemsCount != 0)
            {
                EmptyCollectionView.Hidden = true;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AreaCollection != null)
            {
                AreaCollection.Dispose();
                AreaCollection = null;
            }

            if (AreaCollectionHeight != null)
            {
                AreaCollectionHeight.Dispose();
                AreaCollectionHeight = null;
            }

            if (cnCollectionViewHeight != null)
            {
                cnCollectionViewHeight.Dispose();
                cnCollectionViewHeight = null;
            }

            if (cnsAreaCollectionTop != null)
            {
                cnsAreaCollectionTop.Dispose();
                cnsAreaCollectionTop = null;
            }

            if (CollectionView != null)
            {
                CollectionView.Dispose();
                CollectionView = null;
            }

            if (EmptyCollectionView != null)
            {
                EmptyCollectionView.Dispose();
                EmptyCollectionView = null;
            }

            if (TableView != null)
            {
                TableView.Dispose();
                TableView = null;
            }

            if (ViewForImage != null)
            {
                ViewForImage.Dispose();
                ViewForImage = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AllRewardsButton != null)
            {
                AllRewardsButton.Dispose();
                AllRewardsButton = null;
            }

            if (AreaCollection != null)
            {
                AreaCollection.Dispose();
                AreaCollection = null;
            }

            if (AreaCollectionHeight != null)
            {
                AreaCollectionHeight.Dispose();
                AreaCollectionHeight = null;
            }

            if (AvailableRewardsButton != null)
            {
                AvailableRewardsButton.Dispose();
                AvailableRewardsButton = null;
            }

            if (ClaimedButton != null)
            {
                ClaimedButton.Dispose();
                ClaimedButton = null;
            }

            if (cnsAreaCollectionTop != null)
            {
                cnsAreaCollectionTop.Dispose();
                cnsAreaCollectionTop = null;
            }

            if (CollectionView != null)
            {
                CollectionView.Dispose();
                CollectionView = null;
            }

            if (EmptyCollectionView != null)
            {
                EmptyCollectionView.Dispose();
                EmptyCollectionView = null;
            }

            if (tabBarView != null)
            {
                tabBarView.Dispose();
                tabBarView = null;
            }

            if (ViewForImage != null)
            {
                ViewForImage.Dispose();
                ViewForImage = null;
            }
        }