Skip to content

JamesSedlacek/AppearanceProviding

Repository files navigation

AppearanceProviding

Swift Package Manager GitHub stars GitHub forks GitHub contributors Pull Requests Badge Issues Badge

Description

AppearanceProviding is a SwiftUI library for selecting a preferred color scheme.


Requirements

  • iOS: 17.0 or later.
  • macOS: 14.0 or later.

Installation

You can install AppearanceProviding using the Swift Package Manager.

  1. In Xcode, select "File" > "Add Package Dependencies".
  2. Copy & paste the following into the "Search or Enter Package URL" search bar.
https://github.com/JamesSedlacek/AppearanceProviding.git
  1. Xcode will fetch the repository & the "AppearanceProviding" library will be added to your project.

Usage

  1. Add .setAppearance() to the root view in your project.
import AppearanceProviding
import SwiftUI

@main
struct ExampleApp: App {
    var body: some Scene {
        ContentView()
            .setAppearance()
    }
}

  1. Use an Appearance Picker in the settings screen in your project.
import AppearanceProviding
import SwiftUI

struct SettingsView {
    var body: some View {
        VStack {
            AppearanceMenuPicker()
            AppearanceSegmentedControl()
            AppearanceSheetPicker()
        }
    }
}

Author

James Sedlacek, find me on X/Twitter or LinkedIn

About

SwiftUI library for selecting a preferred color scheme

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages