Example #1
0
        public static _View HitTestOutsideFrame(
            this _View thisView
            , CGPoint point
#if __IOS__
            , _Event uievent
#endif
            )
        {
            // All touches that are on this view (and not its subviews) are ignored
            if (!thisView.Hidden && thisView.GetNativeAlpha() > 0)
            {
                foreach (var subview in thisView.Subviews.Safe().Reverse())
                {
                    var subPoint = subview.ConvertPointFromView(point, thisView);
#if __IOS__
                    var result = subview.HitTest(subPoint, uievent);
#elif __MACOS__
                    var result = subview.HitTest(subPoint);
#endif
                    if (result != null)
                    {
                        return(result);
                    }
                }
            }

            return(null);
        }