- August 28, 2025
- Mins Read
GridView is a free, and open-source library for SwiftUI that makes creating grids easier and much cleaner.
GridView
constructor – simply pass your data and we’ll deal with the rest. Simple as never!✋ Requirements
Platforms | Minimum Swift Version |
---|---|
iOS 14+ | 5.0 |
Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the Swift compiler.
Once you have your Swift package set up, adding GridView as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: “https://github.com/Mijick/GridView”, branch(“main”))
]
To declare a Grid for your data set, call the constructor:
struct ContentView: View {
private let data = [SomeData]()
var body: some View {
GridView(data, id: \.self) { element in
SomeItem(element: element)
}
}
}
Your GridView can be customised by calling configBuilder
inside the initialiser:
struct ContentView: View {
private let data = [SomeData]()
var body: some View {
GridView(data, id: \.self, content: SomeItem.init, configBuilder: { $0
.insertionPolicy(.fill)
.columns(4)
.verticalSpacing(12)
})
}
}
You can change the number of columns of an item by calling .columns of Item:
struct ContentView: View { … }
struct SomeItem: View {
…
var body: some View {
…
.columns(2)
}
}
This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...
Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...