【发布时间】:2017-09-10 08:13:11
【问题描述】:
我有 2 个自定义单元格,分别是 singleCell 和 doubleCell。我想知道在触发 didSelectItemAt 方法时选择了哪一个。
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if singleSelected {
print("SINGLE CELL SELECTED)
} else {
print("DOUBLE CELL SELECTED)
}
}
谢谢。
【问题讨论】:
标签: ios swift swift3 uicollectionview