Swiftpack.co - ericlewis/View-Bleed as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by ericlewis.
ericlewis/View-Bleed 1.0.0
The opposite of padding.
⭐️ 2
🕓 2 years ago
iOS macOS tvOS
.package(url: "https://github.com/ericlewis/View-Bleed.git", from: "1.0.0")

View+Bleed

The opposite of padding.

Example

import SwiftUI
import View_Bleed

struct ContentView: View {
    let padding = 10.0

    var body: some View {
        VStack(spacing: padding) {
            Color.red
                .aspectRatio(1, contentMode: .fit)
                .bleed([.horizontal, .top], padding)
            Text("Testing")
        }
        .padding(padding)
        .border(Color.red)
        .padding()
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
Preview
Simulator Screen Shot - iPhone 13 Pro - 2021-11-30 at 17 42 56

GitHub

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

Release Notes

1.0.0
2 years ago

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