UIKit1 UICollectionViewCell에서 IndexPath 가져오는 법 UIcollectionViewCell이 자신의 현재 indexPath를 알려면 직접 indexPath를 넣어 줄 수 있습니다. final class TestCell: UICollectionViewCell { //... var indexPath: IndexPah } //UICollectionViewDataSource func collectionView( _ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { //... guardelet cell = collectionView.dequeueReusableCell(withReuseIdentifier: "TestCell") as? TestCel.. 2023. 4. 24. 이전 1 다음