示例#1
0
        /*CGRect GetTappedTextFieldFrame( RectangleF textFrame )
         * {
         *  // first subtract the amount scrolled by the view.
         *  nfloat yPos = textFrame.Y - UIScrollView.ContentOffset.Y;
         *  nfloat xPos = textFrame.X - UIScrollView.ContentOffset.X;
         *
         *  // now add in however far down the scroll view is from the top.
         *  yPos += UIScrollView.Frame.Y;
         *  xPos += UIScrollView.Frame.X;
         *
         *  return new CGRect( xPos, yPos, textFrame.Width, textFrame.Height );
         * }*/

        public override void ViewDidDisappear(bool animated)
        {
            base.ViewDidDisappear(animated);

            if (KeyboardAdjustManager != null)
            {
                KeyboardAdjustManager.Deactivate( );
            }
        }
示例#2
0
        public override void ViewDidDisappear(bool animated)
        {
            base.ViewDidDisappear(animated);

            foreach (NSObject handle in ObserverHandles)
            {
                NSNotificationCenter.DefaultCenter.RemoveObserver(handle);
            }

            ObserverHandles.Clear( );

            KeyboardAdjustManager.Deactivate( );
        }
示例#3
0
        void DismissAnimated(bool didSave, object returnContext)
        {
            // guard against multiple dismiss requests
            if (IsDismissing == false)
            {
                IsDismissing = true;

                // run an animation that will dismiss our view, and then remove
                // ourselves from the hierarchy
                SimpleAnimator_Float alphaAnim = new SimpleAnimator_Float(BackgroundPanel.Layer.Opacity, .00f, .33f,
                                                                          delegate(float percent, object value)
                {
                    BackgroundPanel.Layer.Opacity = (float)value;
                }, null);

                alphaAnim.Start(SimpleAnimator.Style.CurveEaseOut);


                // animate OUT the main panel
                PointF endPos = new PointF((float)(View.Bounds.Width - MainPanel.Bounds.Width) / 2, (float)View.Bounds.Height);

                SimpleAnimator_PointF posAnim = new SimpleAnimator_PointF(MainPanel.Layer.Position.ToPointF( ), endPos, .33f,
                                                                          delegate(float percent, object value)
                {
                    MainPanel.Layer.Position = (PointF)value;
                },
                                                                          delegate
                {
                    // hide ourselves
                    View.Hidden = true;

                    IsDismissing = false;

                    KeyboardAdjustManager.Deactivate( );

                    OnCompleteDelegate(didSave, WorkingFamilyId, returnContext);
                });

                posAnim.Start(SimpleAnimator.Style.CurveEaseOut);
            }
        }