Ich habe den folgenden Code benutzerdefinierten iOS UIButton in Xamarin zu erstellen:UIButton mit Typ-Gewohnheit verliert Ereignis Klicken
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
{
// will have to create a native Custom type of ios button to avoid text dimming
// when touched
// logic of element processing from
// https://developer.xamarin.com/guides/xamarin-forms/custom-renderer/view/
// except we don't call the base immediately
// because it will create the Control for us, but we don't want that here
if (Control == null)
{
// instantiate the native control and assign it to the Control property with
// the SetNativeControl method
uiBtn = new UIButton(UIButtonType.Custom);
SetNativeControl(uiBtn); // should set Control to the newly created element
// and prevent base.OnElementChanged(e) from creating a new element instead
}
base.OnElementChanged(e);
// some button customization code here - it does not matter, the issue happens also without it...
Der Code Renderer funktioniert gut, aber jetzt kann ich keine Clicked Ereignisse auf meinem Xamarin.Forms erhalten Taste.
Wie stelle ich die Funktion "Verlorener Klick" wieder her?