16

GitHub - hallee/neumorphic-style: 🎛 Simple SwiftUI ‘neumorphic’ button style

 4 years ago
source link: https://github.com/hallee/neumorphic-style
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

README.md

SwiftUI Neumorphic Button Style

This is a SwiftUI ButtonStyle for styling buttons in a neumorphic style.

I wrote a blog post about it.

You can download this as an interactive Swift Playground.

68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f662e68616c2e636f6465732f70726573732e676966

Usage

import NeumorphicStyle

// ...

@Environment(\.colorScheme) private var colorScheme

var body: some View {
    Button("Hello world") { }
    	.buttonStyle(NeumorphicButtonStyle(colorScheme: colorScheme))
}

Installation

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/hallee/neumorphic-style", from: "0.0.1")
    ],
    ...
)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK