当前位置: 首页>>代码示例>>C#>>正文


C# UISwipeGestureRecognizer.LocationInView方法代码示例

本文整理汇总了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)));
 }
开发者ID:jadaml,项目名称:MonoGame,代码行数:4,代码来源:IOSGameWindow.cs

示例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));
                }
            }
        }
开发者ID:redbitdev,项目名称:socialcloud-mobile,代码行数:22,代码来源:UIAlertsView.cs

示例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)));
     }
 }
开发者ID:nikoware,项目名称:MonoGame,代码行数:8,代码来源:IOSGameWindow.cs


注:本文中的UISwipeGestureRecognizer.LocationInView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。