xamarin/Xamarin.Forms

[ios] listview cell with image and tapgesturerecognizer erroneously call itemselected instead of recognizer

开放

#5,196 创建于 2019年2月11日

 (2 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/gestures 🖖a/listviewe/6 :clock6:help wantedinactivep/iOS 🍎t/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description

this code <Image Source="feedicon.png" Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalOptions="End" VerticalOptions="Center" HeightRequest="40" Aspect="AspectFill" BackgroundColor="Green"> <Image.GestureRecognizers> <TapGestureRecognizer Tapped="btCell_Clicked" NumberOfTapsRequired="1" /> </Image.GestureRecognizers> </Image>

works nice in android version. if i tap image, btCell_Clicked method executes, outside image - itemselected code.

but on IOS, more often called itemselected, and sometimes, rarely -btCellClicked. i tried to enlarge the image to height 100, put a frame on it . nothing helps

Steps to Reproduce

Expected Behavior

if user taps image - gesture recognizer handles the event, if user taps outside image - listview handles the event

Actual Behavior

Basic Information

visual studio 15.9.5 xamarin.forms 3.5.0.129452 ios min OS version 9, on device 11.2.1 ipad mggx2ru/a

贡献者指南