Collection Views: Diffable Data Sources and Compositional Layout | Workshop @SwiftIsland 2019

Collection Views: Diffable Data Sources and Compositional Layout | Workshop @SwiftIsland 2019

9b4d0f03e7d36e05eddbc6fbbf1b7fec?s=128

Marina

July 04, 2019
Tweet

Transcript

  1. Collection Views Diffable Data Source + Compositional Layout Marina Gornostaeva

    @hybridcattt Swift Island 2019 !1
  2. Collection Views Part 1. Diffable Data Sources • Basics •

    Dynamic data Part 2. Compositional Layout • Basics • Per-section layout • Advanced layouts
  3. Diffable Data Source • Generic • Source of truth •

    performBatchUpdates - gone • Free diffing and animations
  4. Compositional layout • Declarative • Forget index paths, think in

    patterns • Composable, fast • Fractional and estimated sizes
  5. NSCollectionLayout… • Size • Item • Group • Section

  6. Known bugs in Xcode 11b3 • Orthogonal layout • crazy

    artefacts for added/removed sections • incorrect content size w/ group insets • incorrect item width w/ item spacing • large title not always showing at first
  7. Next steps • Layout-margin based alignment • Environment-specific layout •

    Supplementary views (badges, headers) • Your own idea!
  8. Next steps • Estimated sizes • Layout-margin based alignment •

    Environment-specific layout • Supplementary views (badges, headers) • Your own idea! • Check out the repo with implementations for these ^ and all the steps from the workshop!
 https://github.com/hybridcattt/IslandGuideSample
  9. Thank you