protected override void OnDetached() { base.OnDetached(); _view.RemoveGestureRecognizer(_tapGesture); _tapGesture.Dispose(); _tapGesture = null; if (_longTapGesture != null) { _view.RemoveGestureRecognizer(_longTapGesture); _longTapGesture.Dispose(); _longTapGesture = null; } if (_command != null) { _command.CanExecuteChanged -= CommandCanExecuteChanged; } if (_longCommand != null) { _longCommand.CanExecuteChanged -= CommandCanExecuteChanged; } _command = null; _longCommand = null; _commandParameter = null; _longCommandParameter = null; _view = null; System.Diagnostics.Debug.WriteLine($"Detached {GetType().Name} from {Element.GetType().FullName}"); }
protected override void OnDetached() { _view.RemoveGestureRecognizer(_tapGesture); _tapGesture.Dispose(); if (_longTapGesture != null) { _view.RemoveGestureRecognizer(_longTapGesture); _longTapGesture.Dispose(); } if (_layer != null) { _layer.Dispose(); _layer = null; } if (_command != null) { _command.CanExecuteChanged -= CommandCanExecuteChanged; } if (_longCommand != null) { _longCommand.CanExecuteChanged -= CommandCanExecuteChanged; } _clickSound?.Dispose(); }
public override void ViewDidUnload() { base.ViewDidUnload(); tagLongPress.Dispose(); tagTap.Dispose(); _webViewObserver?.Dispose(); }
protected override void Dispose(bool disposing) { if (_disposed) { return; } _disposed = true; if (disposing) { if (Element != null) { var mapModel = (Map)Element; MessagingCenter.Unsubscribe <Map, MapSpan>(this, MoveMessageName); ((ObservableCollection <Pin>)mapModel.Pins).CollectionChanged -= OnPinCollectionChanged; ((ObservableCollection <MapElement>)mapModel.MapElements).CollectionChanged -= OnMapElementCollectionChanged; foreach (Pin pin in mapModel.Pins) { pin.PropertyChanged -= PinOnPropertyChanged; } } var mkMapView = (MKMapView)Control; mkMapView.DidSelectAnnotationView -= MkMapViewOnAnnotationViewSelected; mkMapView.RegionChanged -= MkMapViewOnRegionChanged; mkMapView.GetViewForAnnotation = null; mkMapView.OverlayRenderer = null; if (mkMapView.Delegate != null) { mkMapView.Delegate.Dispose(); mkMapView.Delegate = null; } mkMapView.RemoveFromSuperview(); #if __MOBILE__ mkMapView.RemoveGestureRecognizer(_mapClickedGestureRecognizer); _mapClickedGestureRecognizer.Dispose(); _mapClickedGestureRecognizer = null; if (FormsMaps.IsiOs9OrNewer) { // This renderer is done with the MKMapView; we can put it in the pool // for other rendererers to use in the future MapPool.Add(mkMapView); } #endif // For iOS versions < 9, the MKMapView will be disposed in ViewRenderer's Dispose method if (_locationManager != null) { _locationManager.Dispose(); _locationManager = null; } _lastTouchedView = null; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { CollectionViewTapGesture?.Dispose(); CollectionViewTapGesture = null; } }
private void DisposeGestures() { if (_mapTapGesture != null) { CoverView.RemoveGestureRecognizer(_mapTapGesture); _mapTapGesture.Dispose(); _mapTapGesture = null; } }
private void DisposeGestures() { if (_cellTapGesture != null) { ContainerView.RemoveGestureRecognizer(_cellTapGesture); _cellTapGesture.Dispose(); _cellTapGesture = null; } }
private void DisposeGestures() { if (_searchTableTapGesture != null) { SearchTableView.RemoveGestureRecognizer(_searchTableTapGesture); _searchTableTapGesture.Dispose(); _searchTableTapGesture = null; } }
private void DisposeGesture() { if (_viewTapGesture != null) { View.RemoveGestureRecognizer(_viewTapGesture); _viewTapGesture.Dispose(); _viewTapGesture = null; } }
protected override void OnDetached() { mapView.RemoveGestureRecognizer(tapGesture); tapGesture.Dispose(); tapGesture = null; longPressGesture.Dispose(); longPressGesture = null; mapView = null; behavior = null; }
public override void ViewDidUnload() { base.ViewDidUnload(); View.RemoveGestureRecognizer(_tapGesutre); _tapGesutre.Dispose(); _tapGesutre = null; _source.Dispose(); _tableView.Dispose(); }
public override void ViewWillDisappear(bool animated) { base.ViewWillDisappear(animated); _hitArea.RemoveGestureRecognizer(_gesture); _overlay.RemoveFromSuperview(); _gesture.Dispose(); _gesture = null; }
public override void ViewWillDisappear(bool animated) { base.ViewWillDisappear(animated); if (TapGestureRecognizerToHideDrawer != null) { View.Window.RemoveGestureRecognizer(TapGestureRecognizerToHideDrawer); TapGestureRecognizerToHideDrawer.Dispose(); TapGestureRecognizerToHideDrawer = null; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { TapGestureRecognizerToHideDrawer?.Dispose(); TapGestureRecognizerToHideDrawer = null; TableViewController?.Dispose(); TableViewController = null; } }
protected override void Dispose(bool disposing) { if (disposing) { if (_tapGesture != null) { this.RemoveGestureRecognizer(_tapGesture); _tapGesture?.Dispose(); _tapGesture = null; } } base.Dispose(disposing); }
private void DisposeGestures() { if (_headerImageTapGesture != null) { ImageBackground.RemoveGestureRecognizer(_headerImageTapGesture); _headerImageTapGesture.Dispose(); _headerImageTapGesture = null; } if (_descriptionTapGesture != null) { DescriptionLabel.RemoveGestureRecognizer(_descriptionTapGesture); _descriptionTapGesture.Dispose(); _descriptionTapGesture = null; } }
private void CleanupResources() { if (_gestureRecognizer != null) { _animationView?.RemoveGestureRecognizer(_gestureRecognizer); _gestureRecognizer.Dispose(); _gestureRecognizer = null; } if (_animationView != null) { _animationView.RemoveFromSuperview(); _animationView.Dispose(); _animationView = null; } }
private void DisposeGestures() { if (_cellTapGesture != null) { RemoveGestureRecognizer(_cellTapGesture); _cellTapGesture.Dispose(); _cellTapGesture = null; } if (_starTapGesture != null) { StarButton.RemoveGestureRecognizer(_starTapGesture); _starTapGesture.Dispose(); _starTapGesture = null; } }
private void DisposeGestures() { if (_mapTapGesture != null) { NavigateOnMapButton.RemoveGestureRecognizer(_mapTapGesture); _mapTapGesture.Dispose(); _mapTapGesture = null; } if (_cellPressGesture != null) { RemoveGestureRecognizer(_cellPressGesture); _cellPressGesture.Dispose(); _cellPressGesture = null; } }
void ClearCloserRecognizer(ContextActionsCell cell) { if (_globalCloser == null || _globalCloser.State == UIGestureRecognizerState.Cancelled) { return; } cell?.ContentCell?.RemoveGestureRecognizer(_closer); _closer.Dispose(); _closer = null; _table.RemoveGestureRecognizer(_globalCloser); _table = null; _globalCloser.Dispose(); _globalCloser = null; }
protected override void OnDetached() { _view.RemoveGestureRecognizer(_tapGesture); _tapGesture.Dispose(); if (_longTapGesture != null) { _view.RemoveGestureRecognizer(_longTapGesture); _longTapGesture.Dispose(); } if (_layer != null) { _layer.Dispose(); _layer = null; } }
void ClearCloserRecognizer(UIScrollView scrollView) { if (_globalCloser == null || _globalCloser.State == UIGestureRecognizerState.Cancelled) { return; } var cell = GetContextCell(scrollView); cell.RemoveGestureRecognizer(_closer); _closer.Dispose(); _closer = null; _table.RemoveGestureRecognizer(_globalCloser); _table = null; _globalCloser.Dispose(); _globalCloser = null; }
private void AllowCloseImageByTapping() { UITapGestureRecognizer onTapDismissController = null; // Allow the controller to be dismissed by // just tapping the image. Convenient, huh? onTapDismissController = new UITapGestureRecognizer(_ => { imageView.RemoveGestureRecognizer(onTapDismissController); onTapDismissController.Dispose(); onTapDismissController = null; DismissViewController(true, null); }); onTapDismissController.NumberOfTapsRequired = 1; imageView.AddGestureRecognizer(onTapDismissController); }
public override void ViewWillDisappear(bool animated) { base.ViewWillDisappear(animated); _gesture.Dispose(); _gesture = null; _autoScrollHelper.Dispose(); _autoScrollHelper = null; for (var i = 0; i < _contentView.Subviews.Count(); i++) { var textField = _contentView.Subviews[i] as UITextField; if (textField != null) { textField.ShouldReturn = null; } } }
protected override void Dispose(bool disposing) { if (disposing) { if (_swipeDown != null) { _swipeDown.Dispose(); _swipeDown = null; } if (_swipeLeft != null) { _swipeLeft.Dispose(); _swipeLeft = null; } if (_swipeRight != null) { _swipeRight.Dispose(); _swipeRight = null; } if (_swipeUp != null) { _swipeUp.Dispose(); _swipeUp = null; } if (_doubleTap != null) { _doubleTap.Dispose(); _doubleTap = null; } if (_singleTap != null) { _singleTap.Dispose(); _singleTap = null; } if (_pinch != null) { _pinch.Dispose(); _pinch = null; } } // don't try and dispose the base - it will try and dispose of the native control that we didn't create //base.Dispose(disposing); }
private void DisposeGestures() { if (_singleTapRecognizer != null) { ScrollView.RemoveGestureRecognizer(_singleTapRecognizer); _singleTapRecognizer.Dispose(); _singleTapRecognizer = null; } if (_doubleTapRecognizer != null) { ScrollView.RemoveGestureRecognizer(_doubleTapRecognizer); _doubleTapRecognizer.Dispose(); _doubleTapRecognizer = null; } if (_swipeRecognizer != null) { View.RemoveGestureRecognizer(_swipeRecognizer); _swipeRecognizer.Dispose(); _swipeRecognizer = null; } }
protected override void Dispose(bool disposing) { if (_isDisposed) { return; } if (disposing) { if (Element != null) { Element.CloseRequested -= OnCloseRequested; } if (_scrollParent != null) { if (_scrollParent is ScrollView scrollView) { scrollView.Scrolled -= OnParentScrolled; } if (_scrollParent is ListView listView) { listView.Scrolled -= OnParentScrolled; } if (_scrollParent is CollectionView collectionView) { collectionView.Scrolled -= OnParentScrolled; } } if (_tapGestureRecognizer != null) { Control.RemoveGestureRecognizer(_tapGestureRecognizer); _tapGestureRecognizer.Dispose(); _tapGestureRecognizer = null; } if (_contentView != null) { _contentView.Dispose(); _contentView = null; } if (_actionView != null) { _actionView.Dispose(); _actionView = null; } if (_swipeItemsRect != null) { _swipeItemsRect.Clear(); _swipeItemsRect = null; } } _isDisposed = true; base.Dispose(disposing); }
private void ReleaseKeyboardTap() { _keyboardTapGesture?.Dispose(); _keyboardTapGesture = null; }
public override void ViewDidUnload() { base.ViewDidUnload(); tapGesture.Dispose(); }
public void Unbind(UIView view, UITapGestureRecognizer binding) { view.RemoveGestureRecognizer(binding); binding.Dispose(); boundClickActions.Remove(view); }