private void ScrollsToRow(object sender, NSIndexPath index)
        {
            //_tableView.ScrollToRow(NSIndexPath.FromRowSection(index.Row, index.Section), UITableViewScrollPosition.Top, true);
            nfloat animationHeight = 0;

            if (!IsAnimated)
            {
                animationHeight = LocalConstants.RecoverPass_Animation;
            }

            if ((index.Row == 0 && index.Section == 2))
            {
                if (PhoneModelExtensions.IsSmallIphone())
                {
                    animationHeight += LocalConstants.RecoverPass_CodeHeightAnimation;
                    _bigAnimation    = true;
                }

                UIViewAnimationExtensions.AnimateBackgroundView(_backgroundView, animationHeight, true);
                IsAnimated = true;
            }
            else if (_bigAnimation)
            {
                UIViewAnimationExtensions.AnimateBackgroundView(_backgroundView, -LocalConstants.RecoverPass_CodeHeightAnimation, true);
                _bigAnimation = false;
            }
            else
            {
                UIViewAnimationExtensions.AnimateBackgroundView(_backgroundView, animationHeight, true);
                IsAnimated = true;
            }
        }
        public override void OnKeyboardNotification(UIKeyboardEventArgs keybordEvent, bool changeKeyboardState)
        {
            if (_keyboardViewState != changeKeyboardState && ViewIsVisible)
            {
                _keyboardViewState = changeKeyboardState;

                if (!_keyboardViewState)
                {
                    UIViewAnimationExtensions.AnimateBackgroundView(_backgroundView, 0, _keyboardViewState);
                    _source.IsAnimated = false;
                }
            }
        }
Example #3
0
        private void ScrollsToRow(object sender, NSIndexPath indexPath)
        {
            _tableView.ScrollToRow(NSIndexPath.FromItemSection(indexPath.Row, indexPath.Section), UITableViewScrollPosition.Middle, true);

            if ((indexPath.Row == 4 || indexPath.Row == 5) && !IsAnimated)
            {
                UIViewAnimationExtensions.AnimateBackgroundView(_backgroundView, LocalConstants.Register_ViewHeight, true);
                IsAnimated = true;
            }
            else if (indexPath.Row != 4 && indexPath.Row != 5 && IsAnimated)
            {
                IsAnimated = false;
                UIViewAnimationExtensions.AnimateBackgroundView(_backgroundView, 0, false);
            }
        }