Swiftpack.co - alessiorubicini/SFSymbolsPickerForSwiftUI as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by alessiorubicini.
alessiorubicini/SFSymbolsPickerForSwiftUI 1.0.4
A SwiftUI view for selecting SF symbols in your app
⭐️ 28
🕓 3 weeks ago
iOS
.package(url: "https://github.com/alessiorubicini/SFSymbolsPickerForSwiftUI.git", from: "1.0.4")

SF Symbols Picker

SFSymbolsPicker is a simple and powerful SwiftUI picker that let you pick Apple's SF Symbols inside your iOS app with an easy binding!

SF Symbols Picker

Changelog

1.0.3

  • Added the ability to automatically dismiss the view when a symbol is selected
  • Added the ability to specify the view title and a label for the search bar
  • Added a toolbar icon to manually dismiss the view

1.0.2

New update: the way the package loads SF symbols has radically changed. Now the symbols are read at run-time directly by the system, so the users can access the latest symbols added by Apple as soon as they update their devices.

Special thanks to mackoj for the suggestion in implementing this solution.

Usage

Here's a short usage example. You can find the full code in UsageExample.swift.

@State private var icon = "star.fill"
@State private var isPresented = false
    
var body: some View {
    NavigationView {
        VStack {
            Button("Select a symbol") {
                isPresented.toggle()
            }

            Image(systemName: icon).font(.title3)

                .sheet(isPresented: $isPresented, content: {
                    SymbolsPicker(selection: $icon, title: "Pick a symbol", autoDismiss: true)
                }).padding()

        }
        .navigationTitle("SF Symbols Picker")
    }
}

Installation

Required:

  • iOS 14.0 or above
  • Xcode 12.0 or above

In Xcode go to File -> Add Package Dependencies... and paste in the repo's url: https://github.com/alessiorubicini/SFSymbolsPicker. Then choose the main branch or the version you desire.

License

Copyright 2023 (©) Alessio Rubicini.

The license for this repository is MIT License.

Please see the LICENSE file for full reference

GitHub

link
Stars: 28
Last commit: 3 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.0.4
3 weeks ago
  • Fixed visibility bug for SymbolPicker view

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