Ios 用手势输入锁定
我在Xamarin Studio中使用MonoTouch阅读我的MonoGame中的手势。我已经添加了以下代码部分来阅读手势Ios 用手势输入锁定,ios,xamarin.ios,touch,xamarin,monogame,Ios,Xamarin.ios,Touch,Xamarin,Monogame,我在Xamarin Studio中使用MonoTouch阅读我的MonoGame中的手势。我已经添加了以下代码部分来阅读手势 while(TouchPanel.IsGestureAvailable) { GestureSample sample = TouchPanel.ReadGesture(); } 在程序开始时添加了以下内容: TouchPanel.EnabledGestures = GestureType.Tap |
while(TouchPanel.IsGestureAvailable)
{
GestureSample sample = TouchPanel.ReadGesture();
}
在程序开始时添加了以下内容:
TouchPanel.EnabledGestures = GestureType.Tap |
GestureType.Hold |
GestureType.None;
但当我触摸模拟器或设备上的屏幕时,它会完全锁定,对调试没有反应
是什么原因导致了这次锁定?我的代码中遗漏了什么吗?上面的循环将永远运行。它需要是一个
if
-语句
我假设这是您正在使用的单游戏,但是
isgestureavable
将在Update()
周期内始终返回相同的值。我根据您的建议修改了代码。这是有道理的,但对禁闭没有影响。我注意到,如果我在属性中将build从Universal设置为iPhone/iPod,它将不再锁定。此选项在以前的版本中确实有效。