本文整理汇总了C#中UISwipeGestureRecognizer.LocationInView方法的典型用法代码示例。如果您正苦于以下问题:C# UISwipeGestureRecognizer.LocationInView方法的具体用法?C# UISwipeGestureRecognizer.LocationInView怎么用?C# UISwipeGestureRecognizer.LocationInView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UISwipeGestureRecognizer
的用法示例。
在下文中一共展示了UISwipeGestureRecognizer.LocationInView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SwipeGestureRecognizer
public void SwipeGestureRecognizer(UISwipeGestureRecognizer sender)
{
TouchPanel.GestureList.Enqueue(new GestureSample(GestureType.Flick, new TimeSpan(_nowUpdate.Ticks), new Vector2 (sender.LocationInView (sender.View)), new Vector2 (sender.LocationInView (sender.View)), new Vector2(0,0), new Vector2(0,0)));
}
示例2: SwipeHandler
private void SwipeHandler(UISwipeGestureRecognizer args)
{
if(args.State == UIGestureRecognizerState.Ended){
// find the cell
var swipeLocation = args.LocationInView(_tableView);
var index = _tableView.IndexPathForRowAtPoint(swipeLocation);
var cell = _tableView.CellAt(index);
var view = ((AlertsTableViewCell)cell).ContentView2;
if (args.Direction == UISwipeGestureRecognizerDirection.Left) {
if(_lastcell != null){
_lastcell.Animate2 (0.2, ()=>AnimateCellRight(_lastcell), ()=>AnimateCellLeft(view));
}
_lastcell = view;
view.Animate2 (0.2, ()=>AnimateCellLeft(view));
}
else if(args.Direction == UISwipeGestureRecognizerDirection.Right){
_lastcell = null;
view.Animate2 (0.2, ()=>AnimateCellRight(view));
}
}
}
示例3: SwipeGestureRecognizer
public void SwipeGestureRecognizer(UISwipeGestureRecognizer sender)
{
var enabledGestures = TouchPanel.EnabledGestures;
if ((enabledGestures & GestureType.Flick) != 0)
{
TouchPanel.GestureList.Enqueue(new GestureSample(GestureType.Flick, new TimeSpan(_now.Ticks), new Vector2 (sender.LocationInView (sender.View)), new Vector2 (sender.LocationInView (sender.View)), new Vector2(0,0), new Vector2(0,0)));
}
}