UIListContentConfiguration

https://developer.apple.com/documentation/uikit/uilistcontentconfiguration

"A content configuration for a list-based content view."

리스트 기반 컨텐트 뷰에 대한 컨텐트 설정입니다.

Declaration

struct UIListContentConfiguration

Overview

리스트 컨텐트 설정은 셀, 헤더, footer처럼 리스트에서 나타나는 개별적인 요소에 대한 스타일링 및 컨텐트를 설명합니다. 리스트 컨텐트 설정을 사용하면 뷰의 상태마다 다양한 시스템 기본값 스타일링을 가져올 수 있습니다. 설정을 컨텐트로 채울 수 있으며, 바로 UICollectionViewUITableView에 있는 셀, 헤더, footer에 바로 할당할 수 있습니다. 혹은 고유한 리스트 컨텐트 뷰(UIListContentView)에 할당할 수도 있습니다.

셀, 헤더, footer와 같은 뷰는 사전에 설정된 기본값 스타일링을 갖는 리스트 컨텐트 설정을 가져오기 위해 defaultContentConfiguration()을 사용합니다. 다른 방법으로 시스템 기본값 스타일 중 하나로부터 리스트 컨텐트 설정을 생성할 수 있습니다. 설정을 가져온 후 컨텐트를 설정에 할당하고, 다른 모든 속성을 커스터마이징한 뒤, 이를 현재 컨텐트 설정으로써 뷰에 할당해야 합니다.

var content = cell.defaultContentConfiguration()

// Configure content.
content.image = UIImage(systemName: "star")
content.text = "Favorites"

// Customize appearance.
content.imageProperties.tintColor = .purple

cell.contentConfiguration = content

See Also


Content Configurations

UIListContentView

리스트 기반의 컨텐트를 표시하기 위한 컨텐트 뷰입니다.

https://developer.apple.com/documentation/uikit/uilistcontentview
https://velog.io/@panther222128/UIListContentView


좋은 웹페이지 즐겨찾기