public void Remove() { RemoveFromSuperview(); RemoveGestureRecognizer(DragGesture); RemoveGestureRecognizer(DoubleTapGesture); RemoveGestureRecognizer(DoubleTapTwoFigersGesture); RemoveGestureRecognizer(LongPressGesture); RemoveGestureRecognizer(PinchGesture); DeleteButton.TouchUpInside -= DeleteButton_TouchUpInside; OkButton.TouchUpInside -= OkButton_TouchUpInside; EditSignatureButton.TouchUpInside -= EditSignatureButton_TouchUpInside; DeleteButton.RemoveFromSuperview(); OkButton.RemoveFromSuperview(); EditSignatureButton.RemoveFromSuperview(); Dispose(); }
public override void LayoutSubviews() { base.LayoutSubviews(); OkButton.NextToThisView(this, 5); if (OkButton.Superview == null) { Superview.Add(OkButton); } DeleteButton.NextToThisView(this, 5) .BelowThisView(OkButton, 10); if (DeleteButton.Superview == null) { Superview.Add(DeleteButton); } EditSignatureButton.NextToThisView(this, 5) .BelowThisView(DeleteButton, 10); if (EditSignatureButton.Superview == null) { Superview.Add(EditSignatureButton); } }