コード例 #1
0
        public void DemoRight()
        {
            CGPoint demoShift = new CGPoint(this.Superview.Frame.Size.Width - Constants.KHorizontalEdgeOffset, this.Center.Y);
            UIView sub = null;
            if (s_hasRightOverlay)
            {
                this.AddSubview(s_overlayContainer);
                foreach (object sub in s_overlayContainer.Subviews())
                {
                    if (sub.Tag == KSViewTag.RightImage)
                    {
                        break;
                    }

                }
            }

            UIView.AnimateWithDurationAnimations(1.5f, delegate()
                {
                    this.Center = demoShift;
                    this.Alpha = 0.5f;
                    if (s_hasRightOverlay)
                    {
                        if (sub) sub.Alpha = 1.0f;

                    }
                    else
                    {
                        this.Transform = CGAffineTransformMakeRotation(Constants.KStartRotation * Math.PI * Constants.KRotationFactor / 180);
                    }

                });
        }
コード例 #2
0
 public void ShowFromBottom()
 {
     this.Layer.Opacity = 0.0f;
     this.Center = new CGPoint(this.Superview.Center.X, 1.5 * this.Superview.Frame.Size.Height);
     UIView.AnimateWithDurationAnimations(0.5f, delegate()
         {
             this.Layer.Opacity = 1.0f;
             this.Center = this.OriginalCenter;
         });
 }
コード例 #3
0
 public void ShowFromRight()
 {
     this.Layer.Opacity = 0.0f;
     this.Center = new CGPoint(1.5 * this.Frame.Size.Width, this.Superview.Center.Y);
     this.Transform = CGAffineTransformMakeRotation(Constants.KStartRotation * Math.PI / 180);
     UIView.AnimateWithDurationAnimations(0.5f, delegate()
         {
             this.Layer.Opacity = 1.0f;
             this.Transform = CGAffineTransformMakeRotation(0);
             this.Center = this.OriginalCenter;
         });
 }
コード例 #4
0
        public void DemoDown()
        {
            CGPoint demoShift = new CGPoint(this.Center.X, this.Superview.Frame.Size.Height - Constants.KVerticalEdgeOffset);
            this.AddSubview(s_overlayContainer);
            UIView sub = null;
            foreach (object sub in s_overlayContainer.Subviews())
            {
                if (sub.Tag == KSViewTag.DownImage)
                {
                    break;
                }

            }
            UIView.AnimateWithDurationAnimations(1.5f, delegate()
                {
                    this.Center = demoShift;
                    this.Alpha = 0.5f;
                    if (sub) sub.Alpha = 1.0f;

                });
        }
コード例 #5
0
        public void DemoReset()
        {
            UIView.AnimateWithDurationAnimations(0.25f, delegate()
                {
                    this.Center = this.OriginalCenter;
                    this.Alpha = 1.0f;
                    this.Transform = CGAffineTransformMakeRotation(0);
                    foreach (UIView view in s_overlayContainer.Subviews())
                    {
                        switch (view.Tag)
                        {
                            case KSViewTag.UpImage :
                            case KSViewTag.DownImage :
                            case KSViewTag.LeftImage :
                            case KSViewTag.RightImage :
                                view.Alpha = 0.0f;
                                break;
                            default :
                                break;
                        }

                    }
                });
        }