셀의 콘텐츠와 스타일을 구성하는 새로운 API (iOS 13)
배경 모양을 빠르게 지정할 수 있는 여러 속성이 있음
ex) backgroundColor, Insets and corner radius, Custom View ..
표준 레이아웃
ex) Text, Image, Secondary Text ..
let cell: UITableViewCell = ...
var contetn = cell.defaultContentConfiguration()
// 콘텐츠가 설정되지 않은 새 구성이 항상 반환
// cell 및 TableView 스타일을 기반으로 하는 기본 스타일
content.image = UIImage(...)
content.text = "Hello"
cell.contentConfiguration = content
content, styling, metrics and behavior과 같은 특정 상태의 view 모양을 설명
= 속성의 묶음
Configuration과 함께 작동하여 다양한 상태에 대해 다른 모양을 쉽게 얻을 수 있도록 함
ex) Traits
var automaticallyUpdatesContentConfigurations: Bool { get set}
var automaticallyUpdatesBankgroundConfigurations: Bool { get set}
셀의 구성 상태가 변경될 때마다 구성에 자동으로 업데이트된 자체 버전을 반환하도록 요청한 다음 해당 새 구성을 셀에 다시 적용하도록 요청 -> 기본 configuration을 가져오기 용이
func updatesConfigurations(using state: UIConfigurationState)
setNeedsUpdateConfiguration
을 호출하여 업데이트를 요청