0
我有2個自定義單元格singleCell和doubleCell。我想知道在didSelectItemAt方法觸發時選擇哪一個。獲取自定義單元格的標識符
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if singleSelected {
print("SINGLE CELL SELECTED)
} else {
print("DOUBLE CELL SELECTED)
}
}
謝謝。
感謝您的回覆。這是工作。 – Brkr
@Brkr,太棒了!樂意效勞。 –