【发布时间】:2015-12-02 16:26:38
【问题描述】:
我有一个自定义单元格,其中有两个文本字段和一个标签。我添加了一个TapGestuRecognizer 来捕获标签上的用户点击事件。但是,我想知道如何检测选择标签的 CustomCell 的索引?
var tapGesture = new UITapGestureRecognizer (Tap);
myLabel.AddGestureRecognizer (tapGesture);
myLabel.UserInteractionEnabled = true;
public void Tap(UITapGestureRecognizer r)
{
var vc = new myViewController (this);
var nc = new NavigationController (vc);
nc.PreferredContentSize = new System.Drawing.SizeF (200, 300);
popupoverController = new UIPopoverController (nc);
popupoverController.PresentFromRect (myLabel.Bounds, myLabel, UIPopoverArrowDirection.Any, true);
}
【问题讨论】:
标签: ios uitableview xamarin custom-cell