A Staggered Pinterest Like Layout using SwiftUI
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)
}
https://github.com/alfianlosari/SwiftUIStaggeredNote
Inspired by objc.io Swift Talk Building Collection View talk at: https://talk.objc.io/episodes/S01E168-building-a-collection-view-part-2
link |
Stars: 11 |
Last commit: 3 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics