SFSymbolsPicker is a simple and powerful SwiftUI picker that let you pick Apple's SF Symbols inside your iOS app with an easy binding!
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.
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")
}
}
Required:
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.
Copyright 2023 (©) Alessio Rubicini.
The license for this repository is MIT License.
Please see the LICENSE file for full reference
link |
Stars: 28 |
Last commit: 3 weeks ago |
SymbolPicker
viewSwiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics