IOS 7.1 UICollectionView无法识别用于拖动的完整单击区域
我有一个UICollectionViewIOS 7.1 UICollectionView无法识别用于拖动的完整单击区域,ios,xamarin,xamarin.ios,Ios,Xamarin,Xamarin.ios,我有一个UICollectionView 在水平行中显示项目的自定义布局 包含多个子视图的自定义UICollectionViewCell-图像 还有一些标签 UICollectionView的多个实例在UITableView中垂直显示 在iOS 8.1上,所有功能都运行良好。在iOS 7.1上测试,但我不能拖动集合,除非我的手指位于行的上三分之一(由图片中的黄色矩形指示) 请注意,UITableView可以正确地垂直滚动 有什么建议吗 提前感谢,并为C#表示歉意 // The Layout p
// The Layout
public sealed class SingleRowLayout : UICollectionViewFlowLayout
{
public SingleRowLayout()
{
this.ItemSize = new CGSize(50, 120); // 120 is the full cell height
this.ScrollDirection = UICollectionViewScrollDirection.Horizontal;
}
}
// The UICollectionViewCell
public sealed class StickerViewCell : UICollectionViewCell
{
[Export ("initWithFrame:")]
public StickerViewCell (CGRect frame) : base (frame)
{
var top = 0f;
this.imageView = new UIImageView();
this.imageView.ContentMode = UIViewContentMode.ScaleAspectFit;
this.imageView.Frame = new CGRect(
new CGPoint(GridDimensions.ImageInternalSidePadding, top),
new CGSize(GridDimensions.StickerWidth - (GridDimensions.ImageInternalSidePadding * 2), GridDimensions.StickerHeight)
);
top = (float)this.imageView.Frame.Height
this.sequenceTextView = this.createTextView(ref top);
this.dateTextView = this.createTextView(ref top);
this.sensationTextView = this.createTextView(ref top);
ContentView.AddSubview(this.imageView);
ContentView.AddSubview(this.sequenceTextView);
ContentView.AddSubview(this.sensationTextView);
ContentView.AddSubview(this.dateTextView);
}
private UILabel createTextView(ref float top)
{
var result = new UILabel();
result.AdjustsFontSizeToFitWidth = true;
result.Frame = new CGRect(
new CGPoint(2, top),
new CGSize(GridDimensions.StickerWidth - (2 * 2), GridDimensions.TextHeight)
);
top += GridDimensions.TextHeight + GridDimensions.TextFieldSpacing;
return result;
}
}