我试图使用DecelerationEnded回调与MT.Dialog元素“ 抽头 ”回调结合。 我不能让这两个在同一时间工作。
当DecelerationEnded回调被注释掉的“抽头”回调正常工作。 当它在评论的“抽头”回调没有得到触发了(而DecelerationEnded一样)。
当DecelerationEnded就是根的设置,然后“挖”工作的回调按钮上方移动,但是DecelerationEnded回调没有。 延迟回调设置直到viewWillAppear中也没有任何修复。
任何解决方案?
示例代码:
public class TestController : DialogViewController
{
public TestController () : base(UITableViewStyle.Plain, null, true)
{
// Create list of 20 buttons.
Section s = new Section();
for (int i = 0; i < 20; i++ )
{
s.Add(new StringElement("test " + i, () => {
Console.WriteLine("Tapped"); // Tapped callback.
}));
}
Root = new RootElement("Test") {s};
// The following line causes all the "tapped" handlers to not work.
this.TableView.DecelerationEnded += HandleDecelerationEnded;
}
void HandleDecelerationEnded (object sender, EventArgs e)
{
Console.WriteLine ("Deceleration Ended");
}
}