private void GestureRegnizer()
        {
            var gestureRecognizer = new UITapGestureRecognizer(() =>
            {
                NameOnCardTextField.ResignFirstResponder();
                CardNumberTextField.ResignFirstResponder();
                ExpirationMonthTextField.ResignFirstResponder();
                ExpirationYearTextField.ResignFirstResponder();
                CvvTextField.ResignFirstResponder();
                ZipCodeTextField.ResignFirstResponder();
            });

            View.AddGestureRecognizer(gestureRecognizer);
        }
示例#2
0
        void ReleaseDesignerOutlets()
        {
            if (AcceptedCardsImageView != null)
            {
                AcceptedCardsImageView.Dispose();
                AcceptedCardsImageView = null;
            }

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

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

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

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

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

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

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

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

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