Skip to content

kamsebgoralski/Striations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.