TIL75 ✨

YaR Lab·2023년 8월 7일
0

TIL✨

목록 보기
63/135
post-thumbnail

🗓️23.08.04

describing

String(describing: BoxOfficeCollectionViewCell.self)

UICollectionVIewCompositionalLayout

  • 컬렉션뷰를 처음 init할때 layout을 넣어줘야함
  • flowlayout x, delegateflowout x 둘다 안씀

Section 그룹 바구니
Group 아이템 바구니
Item

item SIZE: NSCollectionLayoutSize
item: NSCollectionLayoutItem
groupSize: NSCollectionLayoutSize
group: 배열로 넣어줌

section(group: group)

UICollectionViewDiffableDataSource

클래스

제네릭

타입 명시 <section, ItemData>

섹션 관한 타입 명시

섹션 은 enum

옵셔널 !

NSCache

Ram 저장 방식
key-value 쌍
Generic

https://developer.apple.com/documentation/foundation/url_loading_system/accessing_cached_data


private lazy var session: URLSession = {
        let config = URLSessionConfiguration.default
        let session = URLSession(configuration: config)
        return session
    }()

캐시

서버데이터 캐시해놓은 데이터가 같은 지 유효성 검사
https://nsios.tistory.com/58
링크 2
https://www.blog-dreamus.com/post/cache-control-이-필요한-이유

스크롤 뷰

let contentViewHeightConstraints = contentView.heightAnchor.constraint(equalTo: scrollView.frameLayoutGuide.heightAnchor, constant: 1)
contentViewHeightConstraints.priority = .init(1)
contentViewHeightConstraints.isActive = true

0개의 댓글