如何忽略长按UICollectionView上的节标题视图?

时间:2016-10-04 06:05:52

标签: ios header uicollectionview

我的收藏视图可以重新订购,因为它使用LXReorderableCollectionViewFlowLayout作为其flowLayout对象,并且我不希望我的收藏视图的部分标题响应长按。但我无法检查代理人电话中的部分标题或单元格。

func collectionView(collectionView: UICollectionView, canMoveItemAtIndexPath indexPath: NSIndexPath) -> Bool {
}

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

您可以检查长按的细胞用户类型:

func collectionView(collectionView: UICollectionView, canMoveItemAtIndexPath indexPath: NSIndexPath) -> Bool {

    if let cell = collectionView.cellForItemAtIndexPath(indexPath) as? SectionClassName {
        return false
    }

}
相关问题