TapGestureRecognizer not working with Spans on iOS

Tap gesture not working on iOS devices
below is the code.
<Label Grid.Column="1" Padding="10" x:Name="lblPrivacyLink">
<Label.FormattedText>
<FormattedString>
<Span Text="{x:Static resource:AppResource.LOGIN_CHECKBOX_TERMS_PRIVACY_MESSAGE_1}" FontFamily="{StaticResource BasicFont}" FontSize="14" TextColor="{StaticResource LabelColor}"/>
<Span Text="{x:Static resource:AppResource.LOGIN_CHECKBOX_TERMS_PRIVACY_MESSAGE_2}" FontFamily="{StaticResource ContentFontBold}" FontSize="16" TextColor="{StaticResource LabelPlaceHolder}">
<Span.GestureRecognizers>
<TapGestureRecognizer Tapped="TermsTapGestureRecognizer_Tapped" NumberOfTapsRequired="1"/>
</Span.GestureRecognizers>
</Span>
<Span Text="{x:Static resource:AppResource.LOGIN_CHECKBOX_TERMS_PRIVACY_MESSAGE_3}" FontFamily="{StaticResource BasicFont}" FontSize="14" TextColor="{StaticResource LabelColor}"/>
<Span Text="{x:Static resource:AppResource.LOGIN_CHECKBOX_TERMS_PRIVACY_MESSAGE_4}" FontFamily="{StaticResource ContentFontBold}" FontSize="16" TextColor="{StaticResource LabelPlaceHolder}">
<Span.GestureRecognizers>
<TapGestureRecognizer Tapped="PrivacyTapGestureRecognizer_Tapped" NumberOfTapsRequired="1"/>
</Span.GestureRecognizers>
</Span>
</FormattedString>
</Label.FormattedText>
</Label>
when click TermsTapGestureRecognizer_Tapped then call PrivacyTapGestureRecognizer_Tapped tapped gesture and when click PrivacyTapGestureRecognizer_Tapped then call PrivacyTapGestureRecognizer_Tapped gesture
always call one event when click anyone of both of this.
in android it's working but in iOS it's not working
two tab gesture event
private void TermsTapGestureRecognizer_Tapped(object sender, EventArgs e)
{
}
private void PrivacyTapGestureRecognizer_Tapped(object sender, EventArgs e)
{
}
if click terms of condition then PrivacyTapGestureRecognizer_Tapped called but not called TermsTapGestureRecognizer_Tapped gesture if click PrivacyTapGestureRecognizer_Tapped then it's working
means in both tapped gesture tapped then both called PrivacyTapGestureRecognizer_Tapped gesture not called assign gesture
Why don't define the same Event and handle different logic in it ?
hi @Lucas Zhang - MSFT how to define i can't understand i want like this (bold text tapped gesture) ![44757-image.png][1] [1]: /answers/storage/temp/44757-image.png
You could pass the content (text) as parameter to the command and handle different logic as you want .
Sign in to comment