You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. 아웃렛 컬렉션(Outlet Collection)을 언제 사용하는 것이 좋을까에 대한 고민
단순 요소 반복 또는 동일한 UI 구성, 디자인적 요소를 다룰 때 적합하다고 볼 수 있다. 물론 인덱스를 활용해서 데이터에 접근하거나 변경하는 것도 가능하지만 이후에 UI 구조가 변경되거나 코드를 다시 확인하고자 할 때 어려움이 생길 수 있다. 디자인적인 부분과 데이터적인 부분은 분리가 더 적절할 수 있다.
2. 객체의 선언 위치 (feat. DateFormatter)
함수 내부
클래스 내부
파일 전체
3. TableView
Contents
Static cell : 형식이 항상 동일함
Dynamic type : 데이터에 따라 컨텐츠가 달라짐, 대부분의 경우 해당 방식을 사용
View
Header View
Footer View
Style
Plain
Grouped
Inset Grouped (iOS 13 ~)
필수 메서드
numberOfRowsInSection
cellForRowAt
4. TableView Cell
System
Basic (titleLabel, imageView)
Subtitle (textLabel, detailTextLabel, imageView)
Right detail (textLabel, detailTextLabel, imageView)
Left detail (textLabel, detailTextLabel)
5. IndexPaths
특정 섹션의 특정 행에 대한 위치 정보
섹션과 행의 속성을 통해 액세스 가능
(Section#, Row#)
indexPath.row
indexPath.section
3가지는 확인하자.
Cell Identifier를 정확히 기입하지 않았을 때 (- 휴먼에러)
셀의 개수를 정확히 리턴하지 않을 때
Row가 아닌 Section에만 개수를 정해놨을 때
The text was updated successfully, but these errors were encountered:
1. 아웃렛 컬렉션(Outlet Collection)을 언제 사용하는 것이 좋을까에 대한 고민
단순 요소 반복 또는 동일한 UI 구성, 디자인적 요소를 다룰 때 적합하다고 볼 수 있다. 물론 인덱스를 활용해서 데이터에 접근하거나 변경하는 것도 가능하지만 이후에 UI 구조가 변경되거나 코드를 다시 확인하고자 할 때 어려움이 생길 수 있다. 디자인적인 부분과 데이터적인 부분은 분리가 더 적절할 수 있다.
2. 객체의 선언 위치 (feat. DateFormatter)
3. TableView
Contents
View
Style
필수 메서드
4. TableView Cell
System
5. IndexPaths
(Section#, Row#)
3가지는 확인하자.
The text was updated successfully, but these errors were encountered: