Esempio n. 1
0
        protected override void OnAttached()
        {
            View.UserInteractionEnabled = true;

            UpdateTap();
            UpdateTapParameter();
            UpdateLongTap();
            UpdateLongTapParameter();

            TouchGestureCollector.Add(View, OnTouch);
        }
Esempio n. 2
0
        protected override void OnAttached()
        {
            View.UserInteractionEnabled = true;
            _layer = new UIView {
                UserInteractionEnabled = false,
                Opaque = false,
                Alpha  = 0,
                TranslatesAutoresizingMaskIntoConstraints = false
            };

            UpdateEffectColor();
            TouchGestureCollector.Add(View, OnTouch);

            View.AddSubview(_layer);
            View.BringSubviewToFront(_layer);
            _layer.TopAnchor.ConstraintEqualTo(View.TopAnchor).Active       = true;
            _layer.LeftAnchor.ConstraintEqualTo(View.LeftAnchor).Active     = true;
            _layer.BottomAnchor.ConstraintEqualTo(View.BottomAnchor).Active = true;
            _layer.RightAnchor.ConstraintEqualTo(View.RightAnchor).Active   = true;
        }
Esempio n. 3
0
 protected override void OnDetached()
 {
     TouchGestureCollector.Delete(View, OnTouch);
 }
Esempio n. 4
0
 protected override void OnDetached()
 {
     TouchGestureCollector.Delete(View, OnTouch);
     _layer?.RemoveFromSuperview();
     _layer?.Dispose();
 }