Esempio n. 1
0
        protected override void ConnectHandler(ContentView nativeView)
        {
            var uiTapGestureRecognizer = new UITapGestureRecognizer(a => nativeView?.EndEditing(true));

            uiTapGestureRecognizer.ShouldRecognizeSimultaneously = (recognizer, gestureRecognizer) => true;
            uiTapGestureRecognizer.ShouldReceiveTouch            = OnShouldReceiveTouch;
            uiTapGestureRecognizer.DelaysTouchesBegan            =
                uiTapGestureRecognizer.DelaysTouchesEnded        = uiTapGestureRecognizer.CancelsTouchesInView = false;
            nativeView.AddGestureRecognizer(uiTapGestureRecognizer);

            base.ConnectHandler(nativeView);
        }