diff options
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs index 5eb9b777..68d4702d 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/ButtonRenderer.cs @@ -38,10 +38,7 @@ namespace Xamarin.Forms.Platform.iOS protected override void Dispose(bool disposing) { if (Control != null) - { Control.TouchUpInside -= OnButtonTouchUpInside; - Control.TouchDown -= OnButtonTouchDown; - } base.Dispose(disposing); } @@ -63,7 +60,6 @@ namespace Xamarin.Forms.Platform.iOS _buttonTextColorDefaultDisabled = Control.TitleColor(UIControlState.Disabled); Control.TouchUpInside += OnButtonTouchUpInside; - Control.TouchDown += OnButtonTouchDown; } UpdateText(); @@ -90,32 +86,11 @@ namespace Xamarin.Forms.Platform.iOS UpdateImage(); } - protected override void SetAccessibilityLabel() - { - // If we have not specified an AccessibilityLabel and the AccessibiltyLabel is current bound to the Title, - // exit this method so we don't set the AccessibilityLabel value and break the binding. - // This may pose a problem for users who want to explicitly set the AccessibilityLabel to null, but this - // will prevent us from inadvertently breaking UI Tests that are using Query.Marked to get the dynamic Title - // of the Button. - - var elemValue = (string)Element?.GetValue(Accessibility.NameProperty); - if (string.IsNullOrWhiteSpace(elemValue) && Control?.AccessibilityLabel == Control?.Title(UIControlState.Normal)) - return; - - base.SetAccessibilityLabel(); - } - void OnButtonTouchUpInside(object sender, EventArgs eventArgs) { - ((IButtonController)Element)?.SendReleased(); ((IButtonController)Element)?.SendClicked(); } - void OnButtonTouchDown(object sender, EventArgs eventArgs) - { - ((IButtonController)Element)?.SendPressed(); - } - void UpdateBorder() { var uiButton = Control; |