A SwiftUI ViewModifier to add a text watermark to a component.
In your Package.swift
file, add the following
.package(url: "https://github.com/zachwick/watermark.git", from: "1.0.0")
import Watermark
struct ContentView: View {
var body: some View {
VStack {
Color.blue
.frame(width: 300, height: 50)
.watermarked(with: "a default watermark")
Color.red
.frame(width: 300, height: 50)
.watermarked(with: "non-default options", alignment: .bottomLeading, opacity: 0.75, foreground: .blue, background: .white)
}
}
}
Watermark is released under the MIT license