Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 触摸UICollectionView上的事件,导致无法调用委托方法_Ios_Iphone_Objective C_Uicollectionview_Uicollectionviewdelegate - Fatal编程技术网

Ios 触摸UICollectionView上的事件,导致无法调用委托方法

Ios 触摸UICollectionView上的事件,导致无法调用委托方法,ios,iphone,objective-c,uicollectionview,uicollectionviewdelegate,Ios,Iphone,Objective C,Uicollectionview,Uicollectionviewdelegate,我设置了一个UICollectionView,其中有单元格。我想点击这些单元格播放声音,并且能够将这些单元格拖动到不同的视图中,以将这些声音放入其中 要播放声音,我使用-collectionView:collectionView didSelectItemAtIndexPath方法。为了实现拖动功能,我在touchsbegind、touchsmoved等方法中使用了自定义登录 但是,如果我有touchsbegind、touchsmoved等方法,就永远不会调用UICollectionView委托

我设置了一个UICollectionView,其中有单元格。我想点击这些单元格播放声音,并且能够将这些单元格拖动到不同的视图中,以将这些声音放入其中

要播放声音,我使用-collectionView:collectionView didSelectItemAtIndexPath方法。为了实现拖动功能,我在touchsbegind、touchsmoved等方法中使用了自定义登录


但是,如果我有touchsbegind、touchsmoved等方法,就永远不会调用UICollectionView委托方法。是否有办法延迟交付触摸事件,直到委托方法失败?或者,如果我使用触摸事件,我是否也必须实现自定义逻辑来检测单元上的点击?

是否进一步传递触摸,调用super?否。我刚刚发现,在进一步搜索UITableViews时,这正是我所缺少的。但在搜索UICollectionView时,它不会显示。你想把它作为答案写进去吗?