Iphone 如何禁用视图层次上的多个触摸?
在我的iPad应用程序中 正在开发拖放 在模拟器中一切正常,因为在模拟器中只有一次鼠标指针的触摸 但在设备中,由于多次触摸,一切都会受阻… 在我的iPad应用程序中Iphone 如何禁用视图层次上的多个触摸?,iphone,objective-c,xcode,cocoa-touch,touch,Iphone,Objective C,Xcode,Cocoa Touch,Touch,在我的iPad应用程序中 正在开发拖放 在模拟器中一切正常,因为在模拟器中只有一次鼠标指针的触摸 但在设备中,由于多次触摸,一切都会受阻… 在我的iPad应用程序中 View contains scrollview and scroll view contaains cells... I have done user interaction disabled on touches began and user interaction Enabled on touches Ended 虽
View contains scrollview and scroll view contaains cells...
I have done
user interaction disabled
on touches began
and
user interaction Enabled
on touches Ended
虽然它允许触摸
我还为所有视图禁用了多点触摸功能
请帮助我,我被绊倒了……我从您的问题中假设您想禁用视图上的多次触摸。为此,只需使用
multipleTouchEnabled
属性,如下所示:self.view.multipleTouchEnabled=NO
。不要忘记迭代所有视图和子视图以设置此属性
下次,也许可以看看苹果自己的文档,因为它非常好,
multipletouchedabled
bool是所有UIView子类的标准配置。multipletouchedabled
禁用对其应用的视图的多次触摸。如果您仍然能够使用多点触摸,那么您很可能没有将其应用于所有子视图,或者您的问题与多点触摸完全无关