Swiftpack.co - alfianlosari/SwiftUIStaggeredList as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by alfianlosari.
alfianlosari/SwiftUIStaggeredList 0.1.4
Staggered Layout List Using SwiftUI
⭐️ 12
🕓 4 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/alfianlosari/SwiftUIStaggeredList.git", from: "0.1.4")

StaggeredList

A Staggered Pinterest Like Layout using SwiftUI

Alt text

Installation

  • Add the dependency to your target/project using Swift Package Manager
  • Import framework in your source

How to use

Initialize StaggeredLayoutList passing your collection that conforms to Identifiable. Vertical and Horitontal Spacing can be passed for adding padding between items. Also Section Insets can be passed to add inset to the List.

StaggeredLayoutList(data: self.notes, numberOfColumns: self.numberOfColumns, horizontalSpacing: self.spacing, verticalSpacing: self.spacing, sectionInsets: sectionInset) {
    NoteView(note: $0)
}

Sample App (iOS, macOS, watchOS, tvOS)

https://github.com/alfianlosari/SwiftUIStaggeredNote

Special Thanks

Inspired by objc.io Swift Talk Building Collection View talk at: https://talk.objc.io/episodes/S01E168-building-a-collection-view-part-2

GitHub

link
Stars: 12
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

4 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics