コード例 #1
0
        private void HideCollectionViewWithAnimation()
        {
            if (collectionView != null)
            {
                collectionView.ResignFirstResponder();

                UIView.Animate(0.15d, delegate
                {
                    collectionView.Frame = new CGRect(0, this.View.Frame.Bottom, this.View.Frame.Width, COLLECTIONVIEW_HEIGHT);
                }, delegate
                {
                    if (collectionView != null)
                    {
                        collectionView.RemoveFromSuperview();
                        collectionView.Dispose();
                        collectionView = null;
                    }

                    if (transButton != null)
                    {
                        transButton.RemoveFromSuperview();
                        transButton.Dispose();
                        transButton = null;
                    }
                });
            }
        }
コード例 #2
0
        protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                _insetTracker?.Dispose();
                _insetTracker = null;

                DataSource?.Dispose();
                DataSource = null;

                if (_refreshControl != null)
                {
                    _refreshControl.ValueChanged -= RefreshControl_ValueChanged;
                    _refreshControl.Dispose();
                    _refreshControl = null;
                }

                _collectionView?.Dispose();
                _collectionView = null;
            }

            _disposed = true;

            base.Dispose(disposing);
        }
コード例 #3
0
        public override void ViewDidDisappear(bool animated)
        {
            base.ViewDidDisappear(animated);

            if (this.IsMovingFromParentViewController)
            {
                if (!codeVisible)
                {
                    if (typeSampleView != null)
                    {
                        if (typeSampleView.OptionView != null)
                        {
                            typeSampleView.OptionView.RemoveFromSuperview();
                            typeSampleView.OptionView.Dispose();
                            typeSampleView.OptionView = null;
                        }

                        typeSampleView.RemoveFromSuperview();
                        typeSampleView.Dispose();
                        typeSampleView = null;
                    }

                    if (featureSampleView != null)
                    {
                        if (featureSampleView.OptionView != null)
                        {
                            featureSampleView.OptionView.RemoveFromSuperview();
                            featureSampleView.OptionView.Dispose();
                            featureSampleView.OptionView = null;
                        }

                        featureSampleView.RemoveFromSuperview();
                        featureSampleView.Dispose();
                        featureSampleView = null;
                    }

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

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

                    Utility.DisposeEx(this.View);
                    this.Dispose();
                }
            }
        }
コード例 #4
0
        protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                DataSource?.Dispose();
                DataSource = null;

                _collectionView?.Dispose();
                _collectionView = null;
            }
            _disposed = true;
            base.Dispose(disposing);
        }
コード例 #5
0
        public override void ViewDidDisappear(bool animated)
        {
            base.ViewWillDisappear(animated);

            if (!Utility.IsIPad)
            {
                NSNotificationCenter.DefaultCenter.RemoveObserver(obs1);
                NSNotificationCenter.DefaultCenter.RemoveObserver(obs2);
            }

            if (this.IsMovingFromParentViewController)
            {
                //moving back
                if (!(optionVisible || codeVisible))
                {
                    if (sample != null)
                    {
                        if (sample.OptionView != null)
                        {
                            sample.OptionView.RemoveFromSuperview();
                            sample.OptionView.Dispose();
                            sample.OptionView = null;
                        }
                        Utility.DisposeEx(sample);
                        sample.RemoveFromSuperview();
                        sample.Dispose();
                        sample = null;
                    }
                    if (optionView != null)
                    {
                        //optionView.RemoveFromSuperview();
                        optionView.Dispose();
                        optionView = null;
                    }
                    if (collectionView != null)
                    {
                        collectionView.Dispose();
                        collectionView = null;
                    }

                    Utility.DisposeEx(this.View);

                    this.Dispose();
                }
            }
        }
コード例 #6
0
ファイル: ViewController.cs プロジェクト: t3ch3/ButtonMap
 /// <summary>
 /// Disposes of grid and cells.
 /// </summary>
 public void ClearGrid()
 {
     Grid.RemoveFromSuperview(); //remove grid from view
     Grid.Dispose();
 }