Esempio n. 1
0
        public TouchRecognizer(Element element, UIView view, Wesley.BitImageEditor.TouchTracking.TouchEffect touchEffect)
        {
            this.element     = element;
            this.view        = view;
            this.touchEffect = touchEffect;

            viewDictionary.Add(view, this);
        }
Esempio n. 2
0
        protected override void OnAttached()
        {
            // Get the iOS UIView corresponding to the Element that the effect is attached to
            view = Control == null ? Container : Control;

            // Get access to the TouchEffect class in the .NET Standard library
            Wesley.BitImageEditor.TouchTracking.TouchEffect effect = (Wesley.BitImageEditor.TouchTracking.TouchEffect)Element.Effects.FirstOrDefault(e => e is Wesley.BitImageEditor.TouchTracking.TouchEffect);

            if (effect != null && view != null)
            {
                // Create a TouchRecognizer for this UIView
                touchRecognizer = new TouchRecognizer(Element, view, effect);
                view.AddGestureRecognizer(touchRecognizer);
            }
        }