void ReleaseDesignerOutlets() { if (DoubleTouchImage != null) { DoubleTouchImage.Dispose(); DoubleTouchImage = null; } if (DragImage != null) { DragImage.Dispose(); DragImage = null; } if (TouchImage != null) { TouchImage.Dispose(); TouchImage = null; } if (TouchStatus != null) { TouchStatus.Dispose(); TouchStatus = null; } if (TouchView != null) { TouchView.Dispose(); TouchView = null; } }
protected override void OnElementChanged(ElementChangedEventArgs <Image> e) { base.OnElementChanged(e); if (e.NewElement != null) { touchImage = e.NewElement as TouchImage; nativeElement = Control as UIImageView; nativeElement.UserInteractionEnabled = true; UITapGestureRecognizer tgr = new UITapGestureRecognizer(TapHandler); nativeElement.AddGestureRecognizer(tgr); } }