ViewController에서 UICollection보기가 있는데 didSelectItemAtIndexPath에 전혀 응답하지 않습니다.Swift UICollectionView : didSelectItemAtIndexPath 응답이 없습니다.
// super class
class ViewController: UIViewController, iCarouselDelegate, iCarouselDataSource, UICollectionViewDelegate, UICollectionViewDataSource {
@IBOutlet weak var collectionView: UICollectionView!
// delegate
override func viewDidLoad() {
super.viewDidLoad()
// collection view delegate and datasource
collectionView.delegate = self
collectionView.dataSource = self
// did select item
func collectionView(collectionView: UICollectionView!, didSelectItemAtIndexPath indexPath: NSIndexPath!) {
print(indexPath)
}
이봐, 난 알고있다 세포에있는 버튼이 있습니다. 또는 customCell의 내용은 무엇입니까? –
내가 질문을 올렸을 때 버튼이없고 이미지와 레이블 만있었습니다. 이제이 문제를 어떻게 해결했는지이 질문에 대답했습니다. go 내 대답을 확인하십시오. –