Swiftpack.co - xnth97/SymbolPicker as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by xnth97.
xnth97/SymbolPicker 1.3.0
A simple and cross-platform SFSymbol picker for SwiftUI
⭐️ 37
🕓 38 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/xnth97/SymbolPicker.git", from: "1.3.0")

SymbolPicker

A simple and cross-platform SFSymbol picker for SwiftUI

Features

SymbolPicker provides a simple and cross-platform interface for picking a SFSymbol with search functionality that is backported to iOS 14. SymbolPicker is implemented with SwiftUI and supports iOS, macOS, tvOS and watchOS platforms.

Usage

Requirements

  • iOS 14.0+ / macOS 12.0+ / tvOS 15.0+ / watchOS 8.0+
  • Xcode 13.0+
  • Swift 5.0+

Installation

SymbolPicker is available as a Swift Package. Add this repo to your project through Xcode GUI or Package.swift.

dependencies: [
    .package(url: "https://github.com/xnth97/SymbolPicker.git", .upToNextMajor(from: "1.1.0"))
]

Example

It is suggested to use SymbolPicker within a sheet.

import SwiftUI
import SymbolPicker

struct ContentView: View {
    @State private var iconPickerPresented = false
    @State private var icon = "pencil"

    var body: some View {
        Button(action: {
            iconPickerPresented = true
        }) {
            HStack {
                Image(systemName: icon)
                Text(icon)
            }
        }
        .sheet(isPresented: $iconPickerPresented) {
            SymbolPicker(symbol: $icon)
        }
    }
}

TODO

  • ☐ Categories support
  • ☑ Multiplatform support
  • ☐ Inline UI
  • ☐ Codegen from latest SF Symbols

License

SymbolPicker is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 37
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Related Packages

Release Notes

v1.3
38 weeks ago

+watchOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics