kamsebgoralski / Striations

Background view for SwiftUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License

Striations

Description

Striations is a library for building beautiful background by stripes. Allows you to set the space between the stripes, color and degree of inclination.

Example previews

Striations SwiftUI Striations SwiftUI Striations SwiftUI

Installation

Swift Package Manager

  1. In Xcode press File -> Swift Packages -> Add Package Dependency...
  2. Enter the package URL https://github.com/kamsebgoralski/Striations

Usage

import SwiftUI
import Striations

struct ContentView: View {
    var body: some View {

        ZStack {
            Striations(color: Color.pink.opacity(0.2), width: 16, spacing: 16, rotationDegrees: 45)
            Striations(color: Color.pink.opacity(0.2), width: 16, spacing: 16, rotationDegrees: -45)
            Text("Hello, world!")
                .font(.system(size: 32, weight: .bold))
        }.edgesIgnoringSafeArea(.all)
    }
}

Feedback

If you notice any issue, got stuck or just want to chat feel free to create an issue. I will be happy to help you.

License

Striations is released under the MIT License.

About

Background view for SwiftUI

License:MIT License


Languages

Language:Swift 100.0%