- August 6, 2025
- Mins Read
Collection of custom shapes
RegularPolygon(sides: 32)
RoundedRegularPolygon(sides: 6, radius: 20)
QuadCurve(unitPoints: [
UnitPoint(x: 0.1, y: 0.1),
UnitPoint(x: 0.5, y: 0.9),
UnitPoint(x: 0.9, y: 0.1)
])
.stroke(Color.blue, style: .init(lineWidth: 2, lineCap: .round))
.frame(height: 200)
GridPattern(horizontalLines: 20, verticalLines: 40)
.stroke(Color.white.opacity(0.3), style: .init(lineWidth: 1, lineCap: .round))
.frame(height: 200)
.background(Color.blue)
.padding()
Add Shapes
to your project with Swift Package Manager
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: “YOUR_PROJECT”,
dependencies: [
.package(url: “https://github.com/spacenation/swiftui-shapes.git”, from: “1.1.0”),
]
)
A SwiftUI ScrollView that only scrolls if the content doesn't fit in the View Installation Requirements iOS 13+ Swift Package ...
Swift Package Manager The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated ...
Using StoreReader or @Reading in SwiftUI In SwiftUI, there are two ways to observe a Store: using the StoreReader view ...