Skip to content

Latest commit

 

History

History
78 lines (57 loc) · 2.45 KB

README.md

File metadata and controls

78 lines (57 loc) · 2.45 KB

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