Exemple #1
0
        void SendHandlerOnTouchEvent(UITouch touch, UIView view, MotionEvent motion)
        {
            CGPoint point = touch.LocationInView(view);

            DebugLogViewer.WriteLine(string.Format("  Id[{0}] / Pos[{1}] / Motion[{2}]", touch.Handle, point, motion));
            m_TouchHandler.OnTouchEvent(touch.Handle, (float)point.X, (float)point.Y, motion);
        }
Exemple #2
0
        protected void RegisterTouchEvent()
        {
            m_TouchHandler = new TouchHandler();
            IOSInput.Instance.Initialize(m_TouchHandler);

            View.AddGestureRecognizer(new UITapGestureRecognizer((UITapGestureRecognizer obj) =>
            {
                CGPoint p = obj.LocationInView(View);
                m_TouchHandler.OnTouchEvent((float)p.X, (float)p.Y);
            })
            {
                //NumberOfTapsRequired = 2
            });
        }