본문 바로가기 메뉴 바로가기

Peppo

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Peppo

검색하기 폼
  • 분류 전체보기 (221)
    • Story (13)
    • iOS (143)
      • Error (11)
    • 알고리즘 (43)
    • ETC (7)
    • React-Native (0)
    • CS (Computer science) (3)
  • 방명록

iOS indexPath.row indexPath.item 차이 (1)
[iOS] indexPath.row , IndexPath.item 의 차이점

강의를 듣다가 문득 CollectionView나 TableView의 cell을 나타낼때, indexPath.row / indexPath.item 나눠 사용하는 코드를 봤는데 무슨 차이일까 궁금해서 공부를 해봤습니다. 가시죱 거기에 대한 답변이 잘나와있는 부분을 가져왔어요. 밑줄친 내용을 보면 가독성을 위해 나누어 놨다고 이해하면 되겠네요. 스타일상 UICollectionView에서는 item을, UITableView에서는 row를 사용하는게 더 깔끔한 방식이긴 합니다. (암묵적인 약속..) 하지만 tableview에서 item을 사용해도, collectionview에서 row를 사용해도 아무 문제 없습니다. 참고 1. https://developer.apple.com/forums/thread/123050..

iOS 2022. 6. 22. 15:57
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • Peppo's Github
TAG
  • RTCCameraVideoCapturer
  • Swift Leetcode
  • removeLast()
  • Swift init
  • RIBs tutorial
  • Swift joined()
  • swift (programmers)
  • Class
  • Swift Error Handling
  • Swift 프로퍼티
  • Swift 내림차순
  • Swift 알고리즘
  • swift programmers
  • swift 고차함수
  • swift protocol
  • Swift inout
  • swift property
  • CS 네트워크
  • iOS error
  • Swift joined
  • ios
  • 원티드 프리온보딩
  • Swift final
  • Combine: Asynchronous Programming with Swift
  • Swift 프로그래머스
  • Swift ModernRIBs
  • swift reduce
  • Swift RIBs
  • 2023년 회고
  • Swift
more
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바