This skill provides expert guidance on SymbolPicker, a native, customizable SwiftUI component for selecting SF Symbols on iOS, iPadOS, macOS, and visionOS. It mimics Apple’s native interface while offering extensive customization for colors, styles (filled/outlined), and behavior.
SymbolPicker modifiers (e.g., .symbolPickerSymbolsStyle, .symbolPickerDismiss) for customization.[Double] (RGBA), SwiftUI Color, or SymbolColor..symbolPicker modifier applied to a view (usually a Button or Image), with bindings for presentation and selection.references/SymbolPicker.mdreferences/SymbolPickerView.mdreferences/SymbolPickerView.mdSymbolColor model → references/SymbolColor.mdreferences/SymbolPickerModifiers.md (.symbolPickerSymbolsStyle)references/SymbolPickerModifiers.md (.symbolPickerDismiss).symbolPicker(isPresented: ...) is attached to a view that is part of the hierarchy.isPresented binding is being toggled true..symbolPickerSymbolsStyle(.filled)..symbolPickerDismiss(type: .onSymbolSelect).@State private var isPresented = false
@State private var icon = "star"
Button("Pick Icon") { isPresented = true }
.symbolPicker(isPresented: $isPresented, symbolName: $icon)
@State private var isPresented = false
@State private var icon = "star.fill"
@State private var color: Color = .red
Button("Pick Icon & Color") { isPresented = true }
.symbolPicker(isPresented: $isPresented, symbolName: $icon, color: $color)
.symbolPickerSymbolsStyle(.filled)
.symbolPickerDismiss(type: .onSymbolSelect)
https://github.com/SzpakKamil/SymbolPicker.git (Min version 1.0.0).import SymbolPicker.Load these files as needed for specific topics:
SymbolPicker.md - General overview, setup, and core benefits.SymbolPickerView.md - Detailed information on the picker view and its initializers.SymbolPickerModifiers.md - Customization of style (filled/outlined) and dismissal behavior.SymbolColor.md - Guide to using the SymbolColor enum and color bindings.SetUp.md - Step-by-step installation instructions.共 1 个版本