• 기본 스타일
• 하나 이상의 섹션을 가질 수 있으며 각 섹션은 다시 하나 이상의 로우를 가짐
• 각 섹션은 그 자신의 헤더/푸터 뷰를 가질 수 있고 해당 섹션이 보여질 때 헤더뷰는 Top, 푸터뷰는 Bottom 에 고정
• 섹션을 빠르게 검색할 수 있도록 Indexed List 를 설정 가능
• 관련된 아이템들을 하나의 그룹으로 그룹핑
• 데이터 계층 구조에 대한 상세 정보를 표현하는 데 적합한 형태
• Plain 스타일과 달리 헤더뷰와 푸터뷰가 Top, Bottom 에 고정되지 않음
protocol UITableViewDataSource: NSObjectProtocol {
func tableView(_ tableView: UITableView, numberOfRowsInsection section: Int) -> Int
func tabelView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
}
func tableView(_ tableVIew: UITableView, numberOfRowsInSection section: Int) -> Int {
// 섹션별 row 갯수
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITabelViewCell {
// UITableViewCell 커스터마이징
}