Stripes

SwiftUI Background stripes and other texture patterns.

Example Patterns

Vertical Bars

stripes-swiftui-ipad

Overlapping Patterns

stripes-swiftui-iphone

Usage

import SwiftUI
import Stripes

struct ContentView: View {
    var body: some View {
        ZStack {
            Stripes(config: .default)
            Text("Hello, world!")
                .font(.system(size: 50))
                .bold()
        }
        .frame(maxWidth: .infinity, maxHeight: .infinity)
    }
}

Installation

Preferred: Add package to Xcode project

  1. In Xcode, tap on File -> Swift Packages -> Add Package Dependency

  2. Enter the package URL https://github.com/eneko/Stripes

stripes-install-1

  1. Ensure the library is added to the list of Frameworks & Libraries

stripes-install-2

GitHub